Client Script Error - Change model: Mandatory Fields - After Zurich upgrade

Manigandan24
Tera Contributor

Hi team,

I'm facing this error after the Zurich upgrade on the Change request form "onChange script error: TypeError: g_scratchpad.change_model.refreshMandatoryFields is not a function function () { [native code] }"

Manigandan24_1-1759825183151.png

This is the Client Script that I'm using:

Manigandan24_2-1759825221812.png

 

Kindly suggest any solutions to fix this please.

11 REPLIES 11

@Manigandan24, I tested it on a Zurich release PDI, and the OOTB client script worked perfectly fine. You might want to check if your team has made any customisation to the OOTB configuration earlier. If everything looks standard, consider raising a ticket with ServiceNow for further investigation.

Thanks & Regards,
Muhammad Iftikhar

If my response helped, please mark it as the accepted solution so others can benefit as well.

Weird
Mega Sage

I noticed the same error and tried taking a look.

Looks like "Change model: Mandatory Fields" is a new client script.
It calls function "refreshMandatoryFields" from g_scratchpad object "change_model", but the initialization for the scratchpad object in BR doesn't include that function even OOTB. After looking for more I noticed that another client script "Change Model: Reusables" adds that function to g_scratchpad.
In my case we had the client script inactive so it couldn't be called.

After reverting that Reusables client script to latest version the error disappeared. I'm not going to inspect it further now and I'll just inactivate the new client script as well, but i might be a good idea to get back to it and see if all can be returned to OOB.