- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-28-2026 01:01 AM
Below onChange Client script is working in yokohoma but not in zurich, can someone please help me to understand on what is the issue?
function onChange(control, oldValue, newValue, isLoading) {
if (isLoading || !newValue)
return;
var proceed = confirm("Please confirm");
if (!proceed) {
var ga = new GlideAjax('ScriptIncludeName');
ga.addParam('sysparm_name', 'Function');
ga.addParam('sysparm_abc', g_form.getValue('fieldname'));
ga.getXML(function() {
g_form.setValue('fieldname', '');
g_form.reload();
g_form.showFieldMsg(fieldname, 'cleared.', 'error');
});
}
}
@Ankur Bawiskar @Its_Sagnic @Matthew_13
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-03-2026 10:07 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-28-2026 07:25 AM
not working, but the same script has been there in the other instance which is in yokohoma,, there it is wroking fine.
here onchange was written on attachment type field. @GlideFather
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-28-2026 11:34 AM
@GlideFather After checking it deeper again..I see the attachment itself not getting added to tha attachment variable..and I don't see any size limitations also... So will be there any other thing I've to check and confirm on why attachment is not getting added.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-28-2026 08:41 AM
Hi @Sathwik1 ,
Can you go through this link and check if replacing reload() making your code working.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-28-2026 11:33 AM
@Tanushree Maiti After checking it deeper again..I see the attachment itself not getting added to tha attachment variable..and I don't see any size limitations also... So will be there any other thing I've to check and confirm on why attachment is not getting added.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-28-2026 07:53 PM
what's your business requirement?
share client script config screenshots.
what debugging did you do from your side for this and what are your findings?
💡 If my response helped, please mark it as correct ✅ and close the thread 🔒— this helps future readers find the solution faster! 🙏
Ankur
✨ Certified Technical Architect || ✨ 10x ServiceNow MVP || ✨ ServiceNow Community Leader
