ScopedSessionDomain - Client
-
- UpdatedJan 30, 2025
- 2 minutes to read
- Yokohama
- API reference
The ScopedSessionDomain script include that contains client-side methods that provide functionality related to the current session domain.
This API is only available if the Domain Support - Domain Extensions Installer plugin (com.glide.domain.msp_extensions) plugin has been activated in the instance. In addition, the caller must have the admin role to access this API.
ScopedSessionDomain - getCurrentDomainID()
Returns the sys_id of the current domain for the logged-in user session.
The identifier that is returned depends on the domain type and the instantiation of that
domain.
- If the user is configured in the global domain, and does not use the domain picker to switch domains, the method returns null.
- If the user uses the domain picker to switch to the global domain, the method returns the string "global".
- For all other domains, the method returns the sys_id of that domain.
To access this method from a client-side script, you must use GlideAjax() to invoke it. To
invoke this method from a server-side script, use something similar to the following to
instantiate the object and access the
method.
Name | Type | Description |
---|---|---|
None |
Type | Description |
---|---|
String | Sys_id of the session domain of the current logged-in user. This is the same information that appears in the domain picker. |
Example
This example shows how to call the getCurrentDomainID() method from a client-side script.