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
0
Comments
Check out the function ISSERVICETIER.
AP Commerce, Inc. = where I work
Getting Started with Dynamics NAV 2013 Application Development = my book
Implementing Microsoft Dynamics NAV - 3rd Edition = my 2nd book
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)
TVision Technology Ltd
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...