Muokkaa

Jaa


Session.CurrentClientType() Method

Version: Available or changed with runtime version 1.0.

Gets the client type that is running in current session.

Syntax

ClientType :=   Session.CurrentClientType()

Note

This method can be invoked using property access syntax.

Note

This method can be invoked without specifying the data type name.

Return Value

ClientType
 Type: ClientType
The client type that is running in current session.

Remarks

You can use CurrentClientType as a parameter in the GetURL Method to get the URL of the current client.

Example 1

In the following example, CurrentClientType is used to get the client type for the session and return a message if the session uses the Tablet client.

if CurrentClientType = ClientType::Tablet then  
  Message('The session is running the Tablet client');  

Example 2

In the following example, CurrentClientType is used as a parameter of the GetURL Method to return the URL of the client that invokes the code.

url := GetURL(CurrentClientType);  
Message('The URL is %1.', url);  

Session Data Type
Get Started with AL
Developing Extensions