GlideSession is often confused, for me at least, with
gs. You need to
gs call to get the session, but the session itself has very
specific functions that can be really useful. Below I go over those.
Here's a link to the
|Property / Method||Scoped||Global|
|getTimeZoneName||Get the Time Zone name associated with the user|
|putClientData||Store a value in an active session|
|getLanguage||Language used by the user|
|getUrlOnStack||Gets the current URI for the session|
|getClientData||Fetch the value in active session based on the name|
|isInteractive||Checks if the current session is interactive|
|getClientIP||Gets the client IP address|
|isLoggedIn||Determines if the current user is currently logged in|
|getCurrentApplicationId||Gets the ID of current application, defined as a user preference and set by the application picker|
Clears a session client value previously set with putClientData().
This method is used in a client script to clear data values that were set by a server script using the putClientData() method.
Gets a session client value previously set with putClientData().
This method is used in a client script to retrieve data values that were set by a server script that used the putClientData() method.
Returns the client IP address.
Returns the application currently selected in the application picker.
This method requires admin privileges.
Gets the session's language code.
Returns the session token.
Gets a list of roles for the current user.
The list of roles does not reflect any changes made during the current user session. To get the updated list of roles, the user must log out and log back in.
Gets the name of the session's time zone.
Returns the URL on the stack. Returns null if the stack is empty.
Returns true if the user is impersonating another user.
Determines if the current session is interactive.
An interactive session is one that involves an end-user interacting with a user interface that then retrieves information from a server. An example of this type of session is when a user logs in using the log-in screen or uses a form to query a data store. A non-interactive session is one that only involves programmatic interaction with a server such as a SOAP request to retrieve data.
Determines if the current user is currently logged in.
Sets a session client value that can be retrieved with getClientData(). This method is used in a server side script that runs when a form is created.