DEFAULTCLIENTTYPE Function

Gets the default Microsoft Dynamics NAV client that is configured for the Microsoft Dynamics NAV Server instance that is used by the current session.

[ClientType :=] DEFAULTCLIENTTYPE

Property Value/Return Value

Type: ClientType

The default Microsoft Dynamics NAV client, which 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

Dn911467.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

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

Remarks

The default Microsoft Dynamics NAV client is specified by the DefaultClient setting in the CustomSettings.config file for the Microsoft Dynamics NAV Server instance. You can view and change the setting by opening the CustomSettings.config file directly or using the Microsoft Dynamics NAV Server Administration tool. For more information, see Configuring Microsoft Dynamics NAV Server.

You can use DEFAULTCLIENTTYPE in a GETURL Function call to get the URL of the default Microsoft Dynamics NAV client.

Example

In the following example, DEFAULTCLIENTTYPE is used to return the default Microsoft Dynamics NAV client type that is configured for the Microsoft Dynamics NAV Server instance that is used by the current session.

IF DEFAULTCLIENTTYPE = CLIENTTYPE::Windows THEN
  Message('The default client is Microsoft Dynamics NAV Windows client');

In the following example, DEFAULTCLIENTTYPE is used as a parameter in the GETURL function to return the URL of the default Microsoft Dynamics NAV client that is configured for the Microsoft Dynamics NAV Server instance.

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

See Also

Other Resources

Sessions