Facing issue with on change client script in servicenow Yokohama
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-27-2025 06:10 AM
After the Yokohama upgrade, the “on change” client script pop-ups are appearing twice—first when the field changes and again when saving the form. Has anyone else encountered this issue after the upgrade?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-27-2025 11:41 PM
Hi @rk51 ,
Not really. May I know what your onChange script does?
Thank you,
Hemanth
Certified Technical Architect (CTA), ServiceNow MVP 2024, 2025
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-27-2025 11:46 PM
Should not happen
share your complete script along with client script config screenshots
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-04-2025 12:33 AM
function onChange(control, oldValue, newValue, isLoading, isTemplate) {
if (isLoading || newValue === '') {
return;
}
var main= g_form.getValue('main_acc');
if ((main== 'M') && (newValue != '')) {
if (((newValue == 'All') || (newValue == 'IN')) && ((oldValue == 'All') || (oldValue == 'IN')))
{
alert("Message1");
}
else if((newValue == 'All') || (newValue == 'IN')||(g_scratchpad.man == 'All') || (g_scratchpad.man == 'IN'))
{
alert("Message 2");
}
}
}
//Scractchpad code:
g_scratchpad.man = current.fieldname;
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-04-2025 05:04 AM
your onchange won't run after form is saved unless some onload script is changing the field on which onChange runs
what debugging did you perform?
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader