Dynamics 365 v9 Deprecated Client API
In this article, we will see yet another change in Dynamics 365 v9 Deprecated Client API.
- Some of the existing client APIs are deprecated to reorganize the Xrm client API object model to better align with the need of using the same client scripts without having to change them based on the context or the client (web client or the new Unified Interface) where they run.
- You should plan to use the new client APIs mentioned in the Replacement Client API column instead of the deprecated ones
Dynamics 365 v9 Client APIs are deprecated
You should plan to use the new client APIs mentioned in the Replacement Client API column instead of the deprecated ones.
The deprecated client APIs will continue to be available and supported until they are officially removed from a future major release.
Find Full list of Dynamics 365 v9 Deprecated Client API here: https://docs.microsoft.com/en-us/power-platform/important-changes-coming#some-client-apis-are-deprecated
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 | Use one of the following: a) Use a custom control created using Power Apps component framework instead of HTML web resources. b) On forms, use the getContentWindow method of the web resource control. c) If the getContentWindow method doesn’t work, you can use parent.Xrm to get to the Xrm object inside an HTML web resource. If the HTML web resource is opened in a new window then you should use opener.Xrm instead. |
addOnKeyPress | Use a custom control created using Power Apps component framework |
fireOnKeyPress | Use a custom control created using Power Apps component framework |
removeOnKeyPress | Use a custom control created using Power Apps component framework |
showAutoComplete | Use a custom control created using Power Apps component framework |
hideAutoComplete | Use a custom control created using Power Apps component framework |
Xrm.Utility.alertDialog | Xrm.Navigation.openAlertDialog |
Xrm.Utility.confirmDialog | Xrm.Navigation.openConfirmDialog |
Xrm.Utility.getBarcodeValue | Xrm.Device.getBarcodeValue |
Xrm.Utility.getCurrentPosition | Xrm.Device.getCurrentPosition |
Xrm.Utility.isActivityType | Xrm.Utility.getEntityMetadata |
Xrm.Utility.openEntityForm | Xrm.Navigation.openForm |
Xrm.Utility.openQuickCreate | Xrm.Navigation.openForm |
Xrm.Utility.openWebResource | Xrm.Navigation.openWebResource |
globalContext.organizationSettings.baseCurrencyId | globalContext.organizationSettings.baseCurrency |
globalContext.userSettings.securityRoles | globalContext.userSettings.Roles |
globalContext.userSettings.transactionCurrencyId | globalContext.userSettings.transactionCurrency |
getData and setData for Silverlight web resources | None |
formContext.data.entity.save | formContext.data.save |
ClientGlobalContext.js.aspx | None |
getObject | getContentWindow |
Also find More on Dynamix Academy :
- https://dynamics365book.com/dynamics-365-tls-1-2-microsoft-dynamics-365-v9-new-features/
- https://dynamics365book.com/microsoft-dynamics-365-online-admin-api/
- How to Debug Asynchronous Workflow in Dynamics 365
- Impersonation In Microsoft Dynamics 365/CRM Plugins
- Microsoft Dynamics CRM/365 Interview Question and Answers