Compartir a través de


CURRENTCLIENTTYPE Function

Gets the Microsoft Dynamics NAV client type that is running in current session.

[ClientType :=] CURRENTCLIENTTYPE

Property Value/Return Value

Type: ClientType

The Microsoft Dynamics NAV client type for the current session, which can be one of the following values:

Value Description

Windows

Microsoft Dynamics NAV Windows client

Web

Microsoft Dynamics NAV Web client

Tablet

Microsoft Dynamics NAV Tablet client

Dn911465.note(en-us,NAV.90).gifNote
If you are running tablet.aspx in a browser, the ClientType will return Web.

Desktop

Microsoft Dynamics NAV Web client running in the Dynamics NAV app. In this mode, the Microsoft Dynamics NAV Web client will have, for example, navigation pane and ribbon.

Phone

Microsoft Dynamics NAV Phone client

Dn911465.note(en-us,NAV.90).gifNote
If you are running phone.aspx in a browser, the ClientType will return Web.

Remarks

You can use CURRENTCLIENTTYPE as a parameter in GETURL Function to get the URL of the current client.

Example

In the following example, CURRENTCLIENTTYPE is used to get the Microsoft Dynamics NAV client type for the session and return a message if the session uses the Microsoft Dynamics NAV Windows client.

IF CURRENTCLIENTTYPE = CLIENTTYPE::Windows THEN
  Message('The session is running the Microsoft Dynamics NAV Windows client');

In the following example, CURRENTCLIENTTYPE is used as a parameter of the GETURL Function to return the URL of the Microsoft Dynamics NAV client that invokes the code.

url := GETURL(CURRENTCLIENTTYPE);
MESSAGE('The URL is %1.', url);

See Also

Other Resources

Sessions