Muokkaa

Jaa


getGlobalContext (Client API reference)

Gets the global context.

The method provides access to the global context without going through the form context. It contains an equivalent of all the methods available for the Xrm.Page.context object (now deprecated) to retrieve information specific to the client, organization or user.

Important

To access the global context information in a standalone HTML Web resource, you should include a reference to ClientGlobalContext.js.aspx in the web resource, and then use the GetGlobalContext function. More information: GetGlobalContext function and ClientGlobalContext.js.aspx

Properties of Global Context (getGlobalContext)

Use the following properties of global context to return information about the client, organization settings, or user settings:

Property Description
client Returns information about the client.
organizationSettings Returns information about the current organization settings.
userSettings Returns information about the current user settings.

Methods of Global Context (getGlobalContext)

Method Description
getAdvancedConfigSetting Returns information about the advanced configuration settings for the organization.
getClientUrl Returns the base URL that was used to access the application.
getCurrentAppName Returns the name of the current business app in model-driven apps.
getCurrentAppProperties Returns the properties of the current business app in model-driven apps.
getCurrentAppUrl Returns the URL of the current business app in model-driven apps.
getVersion Returns the version number of the model-driven apps instance.
getWebResourceUrl Returns the relative URL with the caching token for the specified web resource.
isOnPremises Returns a boolean value indicating if the model-driven apps instance is hosted on-premises or online.
prependOrgName Prefixes the current organization's unique name to a string, typically a URL path.