Поділитися через


DEFAULTCLIENTTYPE Function

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

Syntax

[ClientType :=] DEFAULTCLIENTTYPE  

Property Value/Return Value

Type: ClientType

The default 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 Note: 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 Note: If you are running phone.aspx in a browser, the ClientType will return Web.

Remarks

The default 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 Dynamics NAV client.

Example 1

In the following example, DEFAULTCLIENTTYPE is used to return the default 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');  

Example 2

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

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

See Also

Sessions