I need to access a control of a web resource to refresh it. According to the link below we need to have the form context.
But I am unable to get the form context and couldn't find it anywhere in the documentation on how to access the execution context in the HTML web resources. I have tried registering a function on load of the form and passing execution parameter in it using form properties. Then in the function I am getting it like below with formContext variable as a global variable.
var formContext;
function getFormExecutionContext(executionContext) {
formContext = executionContext.getFormContext();
console.log("Form Context: ");
console.dir(formContext);
}
However when I tried to access this formContext in other HTML web resource placed on CRM form, it says undefined. Can someone please explain how can we get the form context in HTML web resource?