Hello Community,
After upgrading to 9.0 recently, we have been experiencing this issue whenever a lead is disqualified or reactivated.
Here is the full error log:
TypeError: executionContext.getFormContext is not a function
at SetUppercase (https://***.crm.dynamics.com/%7B636700249930001087%7D/WebResources/***_Common.js?ver=2021682843:19:40)
at eval (eval at RunHandlerInternal (https://***.crm.dynamics.com/form/ClientApiWrapper.aspx?ver=2021682843:153:1), <anonymous>:1:1)
at RunHandlerInternal (https://***.crm.dynamics.com/form/ClientApiWrapper.aspx?ver=2021682843:159:1)
at RunHandlers (https://***.crm.dynamics.com/form/ClientApiWrapper.aspx?ver=2021682843:118:1)
at ExecuteHandler (https://***.crm.dynamics.com/form/ClientApiWrapper.aspx?ver=2021682843:81:1)
at Mscrm.TurboForm.Control.CustomScriptsManager.$De_1 (https://***.crm.dynamics.com/_static/form/formcontrols.js?ver=2021682843:5093:100)
at Mscrm.TurboForm.Control.CustomScriptsManager.executeHandler (https://***.crm.dynamics.com/_static/form/formcontrols.js?ver=2021682843:5031:18)
at Mscrm.TurboForm.Control.CustomScriptsManager.executeHandlerByDescriptor (https://***.crm.dynamics.com/_static/form/formcontrols.js?ver=2021682843:5062:18)
at https://***.crm.dynamics.com/_static/form/formcontrols.js?ver=2021682843:5073:19
at https://***.crm.dynamics.com/_common/global.ashx?ver=2021682843:6823:193161
Here is the function where the problem is happening in our custom web resource.
function SetUppercase(executionContext, fields) {
var formContext = executionContext.getFormContext();
fields.forEach(function (field) {
if (formContext.getAttribute(field).getValue())
formContext.getAttribute(field).setValue(formContext.getAttribute(field).getValue().toUpperCase());
});
}
Not sure why this started being a problem.
Any help is appreciated.
Thanks!
Kodor