The Client API object model for Dynamics 365 provides to us objects and methods that can used to apply custom business logic with JavaScript.
It’s important that we need to understand the Client API object model to effectively write and use your JavaScript code in D365.
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 Execution context for an event in CRM forms and grids.
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.getFormContextmethod.
gridContext Provides a reference to a grid or a sub grid on a form against which the current code executes.
Xrm Provides a global object for performing operations that do not directly impact the data and UI in forms, grids, sub grids, controls, or attributes. For example, navigate forms, create and manage records using Web API.
Deprecated Client API Replacement Client API
Xrm.Page
Forms: ExecutionContext.getFormContext
Commands: Send it as the PrimaryControl parameter
Xrm.Page.context
Xrm.Utility.getGlobalContext
Xrm.Page.context.getQueryStringParameters
formContext.data.attributes
Xrm.Page.context.getTimeZoneOffsetMinutes
globalContext.userSettings.getTimeZoneOffsetMinutes
Xrm.Page.context.getUserId
globalContext.userSettings.userId
Xrm.Page.context.getUserLcid
globalContext.userSetings.languageId
Xrm.Page.context.getUserName
globalContext.userSettings.userName
Xrm.Page.context.getUserRoles
globalContext.userSettings.securityRoles
Xrm.Page.context.getIsAutoSaveEnabled
globalContext.organizationSettings.isAutoSaveEnabled
Xrm.Page.context.getOrgLcid
globalContext.organizationSettings.languageId
Xrm.Page.context.getOrgUniqueName
globalContext.organizationSettings.uniqueName
Xrm.Page.data.entity.getDataXml
No change in the method, but use "typename" instead of type for lookup attributes.
GridRow.getData
GridRow.data
GridRowData.getEntity
GridRowData.entity
Xrm.Mobile.offline
Xrm.WebApi.offline
parent.Xrm
addOnKeyPress
Use a custom control
removeOnKeyPress
Use a custom control
showAutoComplete
Use a custom control and corresponding UI
hideAutoComplete
Use a custom control and corresponding UI
Xrm.Utility.alertDialog Xrm.Navigation.openAlertDialog
Xrm.Utility.confirmDialog Xrm.Navigation.openConfirmDialog
Xrm.Utility.isActivityType
Xrm.Utility.getEntityMetadata
Xrm.Utility.openEntityForm
Xrm.Navigation.openForm
Xrm.Utility.openQuickCreate
Xrm.Navigation.openForm
Xrm.Utility.openWebResource
Xrm.Navigation.openWebResource
Auf dieser Seite können Sie das Online-Video Dynamics 365 Version 9.x JavaScript Client API mit der Dauer stunde minuten sekunde in guter Qualität ansehen, das der Benutzer CRMONCE - Copilot AI | Power Apps | Power BI 22 Februar 2018 hochgeladen hat, den Link mit Freunden und Bekannten teilen, dieses Video wurde auf Youtube bereits 2,302 Mal angesehen und es wurde von 3 den Zuschauern gefallen. Viel Spaß beim Betrachtenden Zuschauern gefallen!