Why is g_scratchpad used in onSubmit Catalogue Client Script?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-28-2026 03:34 AM
I've just been looking at the onSubmit below Catalogue client Script:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-28-2026 04:01 AM
Basically, g_scratchpad will be declared in display business rules to pass the information from Server side to client side. It will not be declared in the client script. You can look at the business rules of the table where the form is being viewed.
-Dhanraj.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-28-2026 04:01 AM
in this case it's basically used to handle synchronous GlideAjax
Reason being Synchronous GlideAjax is not allowed in portal and in scoped app
💡 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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-28-2026 07:06 PM
Hope you are doing good.
Did my reply answer your question?
💡 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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-29-2026 12:15 AM
Hi @Ankur Bawiskar So does that explain why it is used in my script? Does g_scratchpad hold a value? it's confusing because this is on a catalogue item on client side.

