Understand the Client API object model

Applies to Dynamics 365 (online), version 9.0

The Client API object model for Customer Engagement provides you objects and methods that you can use to apply custom business logic in Customer Engagement using JavaScript, such as:

  • Get or set attribute values.
  • Show and hide user interface elements.
  • Reference multiple controls per attribute.
  • Access multiple forms per entity.
  • Manipulate form navigation items.
  • Interact with the business process flow control.

Its important that you understand the Customer Engagement Client API object model to effectively write and use your JavaScript code in Customer Enagagement.

Root objects in the Client API object model

At the root of the Client API object model are the following contexts and the Xrm object:

Object Description
executionContext Represents the execution context for an event in Customer Engagement forms and grids.
More information: Client API execution context
formContext Provides a reference to a form or an item on the form against which the current code executes. To get the formContext object, use the executionContext.getFormContext method.
More information: Client API form context
gridContext Provides a reference to a grid or a subgrid on a form against which the current code executes.
More information: Client API grid context
Xrm Provides a global object for performing operations that do not directly impact the data and UI in forms, grids, subgrids, controls, or attributes. For example, navigate forms, create and manage records using Web API.
More information: Client API Xrm object

Client API global context

Client API reference