Create one function to assign execution context to a variable called '_globalExecutionContext' .
| CRM2016 |
| Xrm.Page.context.getUserLcid() |
| Xrm.Page.ui.controls.get() |
| Xrm.Page.getControl() |
| Xrm.Page.data.entity.save() |
| Xrm.Page.ui.getFormType() |
| Xrm.Page.data.entity.attributes.forEach |
| Xrm.Page.getAttribute() |
| Xrm.Page.data.entity.getId() |
| Xrm.Page.context.getUserName() |
| Xrm.Page.context.getUserRoles() |
| Xrm.Page.context.getUserId() |
| Xrm.Page.data.entity.attributes.get() |
| Xrm.Page.data.entity.save() |
| Xrm.Navigation.openForm() |
| Xrm.Page.data.entity.getEntityName() |
| Xrm.Page.ui.tabs.get(args) |
| Dynamice 365 |
| Xrm.Utility.getGlobalContext().userSettings.languageId |
| _globalExecutionContext.getFormContext().ui.controls.get() |
| _globalExecutionContext.getFormContext().getControl |
| _globalExecutionContext.getFormContext().data.entity.save() |
| _globalExecutionContext.getFormContext().ui.getFormType() |
| _globalExecutionContext.getFormContext().data.entity.attributes.forEach |
| _globalExecutionContext.getFormContext().getAttribute |
| _globalExecutionContext.getFormContext().data.entity.getId() |
| Xrm.Utility.getGlobalContext().userSettings.userName |
| Xrm.Utility.getGlobalContext().userSettings.securityRoles |
| Xrm.Utility.getGlobalContext().userSettings.userId |
| _globalExecutionContext.getFormContext().data.entity.attributes |
| _globalExecutionContext.getFormContext().data.entity.save() |
| Xrm.Utility.openEntityForm() |
| _globalExecutionContext.getFormContext().data.entity.getEntityName() |
| _globalExecutionContext.getFormContext().ui.tabs.get(arg) |