Client API Xrm object
The Xrm object is globally available to use in your code without having to use the execution context in Client API.
Xrm object model
The following illustration displays the Xrm object model:
Here is the information about each of the namespaces in the Xrm object:
|Xrm.Device||Provides methods to use native device capabilities of mobile devices.|
|Xrm.Encoding||Provides methods to encode strings.|
|Xrm.Navigation||Provides methods for navigating forms and items in model-driven apps.|
|Xrm.Panel||Provides a method to display a web page in the side pane of model-driven apps form.|
|Xrm.Utility||Provides a container for useful methods.|
|Xrm.WebApi||Provides methods to use Web API to create and manage records and execute Web API actions and functions.
Xrm.WebApi.offline: Provides methods to create and manage records in the model-driven apps mobile clients while working in the offline mode.
Xrm.WebApi.online: Provides methods to use Web API to create and manage records and execute Web API actions and functions when connected to the server.
Client API global context
Use the Xrm.Utility.getGlobalContext method in forms to retrieve information specific to an organization, a user, or the client where script is run without going through the form execution context. This is a change from previous versions where you had to use the form context to retrieve global context by using Xrm.Page.context.
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