Client Script Error - Change model: Mandatory Fields - After Zurich upgrade
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-07-2025 01:23 AM
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] }"
This is the Client Script that I'm using:
Kindly suggest any solutions to fix this please.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-07-2025 02:56 AM
@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.
Muhammad Iftikhar
If my response helped, please mark it as the accepted solution so others can benefit as well.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
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.