Wednesday, February 14, 2018
Client API execution context
We can pass the execution context in the following way.
The Client API form context (formContext) provides a reference to the form or to an item on the form, such as, a quick view control or a row in an editable grid, against which the current code is executed.
Earlier, the global Xrm.Page object was used to represent a form or an item on the form. With Dynamics 365 (online), version 9.0, the Xrm.Page object is deprecated, and for you should use the getFormContext method of the passed in execution context object to return reference to the appropriate form or an item on the form.
Utilizing the formContext object rather than the Xrm.Page object
Please find the below sample code for example
var fName = Xrm.Page.getAttribute("firstname").getValue();
var lName = Xrm.Page.getAttribute("lastname").getValue();
var formContext = executionContext.getFormContext(); //to get the formContext
// use formContext instead of Xrm.Page
var fName = formContext.getAttribute("firstname").getValue();
var lName = formContext.getAttribute("lastname").getValue();
Case I have a Data Factory pipeline that should run each hour and collect all new files added to the data lake since the last run. What is...
Microsoft Dynamics CRM supports two types of parameters for a workflow activity. Input Parameters Output Parameters Input Paramete...
I find that using workflow id might be problematic across deployment, so I wrote a function to retrieve workflow’s guid given the workflow...