GetSessionID

Description

Gets the session ID of the current application client. The session ID is a GUID and the string length is 36 characters.

Applies to

Application object

Syntax

applicationname.GetSessionID ( )

Argument

Description

applicationname

The name of the application object for which you want to get the session ID.


Return value

String.

Returns the session ID if it succeeds or an empty string ("") if the current application is not an installable cloud app or the session is not created successfully.

The session ID is a GUID and the string length is 36 characters.

Usage

You can use this function in combination with the PowerServer Web APIs GetAllSessions and KillSession to manage the user session(s). For more, see Get/Kill user sessions.

Example

This example gets the session ID of the current application client.

String    ls_SessionID
ls_SessionID = Getapplication().GetSessionID()