RTC or Classic Client in Code C/AL
Anonymous
Guest Posts: 137
Hello,
In the code C/AL, how to dertermine the client to used (RTC or Classic Client)?
I have a codeunit used in common in RTC and in Classic Client. This Codeunit must run a Page or Form according to the different cases :
- FORM.RUNMODAL(FORM::myForm,rec);
- PAGE.RUNMODAL(PAGE::myForm,rec);
Thanks for your help,
Benoît
In the code C/AL, how to dertermine the client to used (RTC or Classic Client)?
I have a codeunit used in common in RTC and in Classic Client. This Codeunit must run a Page or Form according to the different cases :
- FORM.RUNMODAL(FORM::myForm,rec);
- PAGE.RUNMODAL(PAGE::myForm,rec);
Thanks for your help,
Benoît
0
Comments
-
BDurand wrote:Hello,
In the code C/AL, how to dertermine the client to used (RTC or Classic Client)?
I have a codeunit used in common in RTC and in Classic Client. This Codeunit must run a Page or Form according to the different cases :
- FORM.RUNMODAL(FORM::myForm,rec);
- PAGE.RUNMODAL(PAGE::myForm,rec);
Thanks for your help,
Benoît
Check out the function ISSERVICETIER.Confessions of a Dynamics NAV Consultant = my blog
AP Commerce, Inc. = where I work
Getting Started with Dynamics NAV 2013 Application Development = my book
Implementing Microsoft Dynamics NAV - 3rd Edition = my 2nd book0 -
Point of order. If the Form and Page have the same number you don't have to work out which you need to call, just call the form. If the code is running on the RTC the runtime will assume you meant to call the page and do that instead.BDurand wrote:- FORM.RUNMODAL(FORM::myForm,rec);
- PAGE.RUNMODAL(PAGE::myForm,rec);
Also if you need to find if you're on the RTC without using ISSERVICETIER (eg the code needs to be compiled on V4) you can check the contents of the field table: Table 2000000071, Field 3, first appear in V6.00. For the RTC you need SQL so the Session table doesn't have column 15 (or check for ROWLEVELLOCKING). If you're on the RTC the Server table isn't there.
It's a bit more complex, but it does let you detect all the major versions as well as many of the SPs. 8)Robert de Bath
TVision Technology Ltd0 -
Just remember that requests also can come via Web Service Tier, in that case ISSERVICETIER = TRUE and GUIALLOWED = FALSE :P0
-
http://dynamicsuser.net/blogs/waldo/arc ... -am-i.aspx
Page and Formnumbers should be the same.
If you run form.run on the RTC it will run the page with that number. If you start having forms and pages with different numbers the end is lost...0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.7K Microsoft Dynamics NAV
- 18.8K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 333 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 991 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions
