Interface for the xRM application context.

Hierarchy

  • GlobalContext

Properties

The client's context instance.

organizationSettings: OrganizationSettings

Returns information about the current organization settings.

userSettings: UserSettings

Returns information about the current user settings.

Methods

  • Returns information about the advanced configuration settings for the organization.

    Parameters

    • setting: "MaxChildIncidentNumber" | "MaxIncidentMergeNumber"

      Name of the configuration setting.

    Returns number

  • Gets client's base URL for Dynamics CRM

    Returns string

    The client's base URL

    Example

    // For Dynamics CRM On-Premises:               http(s)://server/org
    // For Dynamics CRM Online: https://org.crm.dynamics.com
    // For Dynamics CRM for Outlook (Offline): http://localhost:2525
  • Returns the name of the current business app in Customer Engagement.

    Returns PromiseLike<string>

  • Gets the current value of a settings row.

    Parameters

    • settingName: string

      Name of the setting youd like to receive the value from.

    Returns string | number | boolean

    The current value of the setting.

  • Returns the URL of the current business app in Customer Engagement.

    Returns string

    A string containing the url of the current business app.

    Example

    // Online        https://**org**.crm.dynamics.com/main.aspx?appid=**GUID**
    // OnPrem https://**server**/**org**/main.aspx?appid=**GUID**
  • Gets current styling theme.

    Returns Xrm.Theme

    The name of the current theme, as either "default", "Office12Blue", or "Office14Silver"

    Remarks

    This function does not work with Dynamics CRM for tablets or in the unified interface.

  • Gets organization's unique name.

    Returns string

    The organization's unique name.

    Remarks

    This value can be found on the Developer Resources page within Dynamics CRM.

    Deprecated

    Deprecated in v9. Use uniqueName globalContext.organizationSettings.uniqueName instead.

    See

    External Link: Deprecated Client APIs

  • Gets query string parameters.

    Returns {
        [index: string]: any;
    }

    The query string parameters, in a dictionary object representing name and value pairs.

    • [index: string]: any

    Deprecated

    Deprecated in v9 (Still applicable in Web Client).

    See

    External Link: Deprecated Client APIs

  • Returns the difference between the local time and Coordinated Universal Time (UTC).

    Returns number

    The time zone offset, in minutes.

  • Gets all user security roles.

    Returns string[]

    An array of user role identifiers, in Guid format.

    Deprecated

    Deprecated in v9. Use globalContext.userSettings.roles instead.

    See

    External Link: Deprecated Client APIs

    Example

    Example: ["cf4cc7ce-5d51-df11-97e0-00155db232d0"]
    
  • Returns the version number of the Dynamics 365 server.

    Returns string

    The version number

  • Returns the relative URL with the caching token for the specified web resource.

    Parameters

    • webResourceName: string

      Name of the web resource.

    Returns string

    The relative URL, including the caching token, for the specified web resource.

  • Returns a boolean value indicating if the Customer Engagement instance is hosted on- premises or online.

    Returns boolean

  • Prefixes the current organization's unique name to a string; typically a URL path.

    Parameters

    • sPath: string

      Local pathname of the resource.

    Returns string

    A path string with the organization name. Format: "/"+ OrgName + sPath

Generated using TypeDoc