SBX - Search With Button

SBX - Forum Post Title

C/AL how to detect if we run in RTC or Classic

Microsoft Dynamics NAV Forum

Mehdi26 asked a question on 14 Jun 2018 4:04 AM
My Badges

Question Status

Suggested Answer

Hi all

is there a way in C/AL to detect if we run on RTC or Classic?

Reply
OfficeZier responded on 14 Jun 2018 4:32 AM
Suggested Answer

You can detect that by using IF ISSERVICETIER THEN...

It returns true if RTC is in use.

Only a precisation: After checking that, you should also check IF GUIALLOWED THEN... because ISSERVICETIER is true also if the code is called by a web service. So, ISSERVICETIER = TRUE and GUIALLOWED = TRUE means RTC.

Reply
OfficeZier responded on 14 Jun 2018 4:35 AM

sorry, I was too fast

Try with Currentclienttype to check, that a windows clienttype is used. Then you can use ISSERVICETIER

forum.mibuso.com/.../rtc-or-classic-client-in-code-c-al

Reply
Suggested Answer

You can detect that by using IF ISSERVICETIER THEN...

It returns true if RTC is in use.

Only a precisation: After checking that, you should also check IF GUIALLOWED THEN... because ISSERVICETIER is true also if the code is called by a web service. So, ISSERVICETIER = TRUE and GUIALLOWED = TRUE means RTC.

Reply

SBX - Two Col Forum

SBX - Migrated JS