Apply Client Script in the Catalog Item
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-01-2025 01:23 AM
Hi Members,
I have written the Client Script in the form and want to apply the same in the Service Catalog. I know that Client Script are not meant for Catalog Items for that I have to write a Catalog Client Script. But is there a way to call the Client Script from Catalog Client Script or any other way to utilize that Client Script in the Catalog Item or else I have to write the same code in the Catalog Client script that I have written in the Client Script?
My intention is to utilize the Client Script instead of writing the code for Catalog Item. Please suggest.
Release - Xanadu.
Thanks,
Neha Pateria
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-01-2025 01:25 AM
Sorry both are made for different purposes and cannot be used across
Normal client scripts -> run on normal form for table
Catalog client scripts -> run on record producer or catalog item
You can access variable values in normal client script using this syntax though if that record got generated via record producer or it's RITM or SC TASK form.
g_form.getValue('variables.variableName');
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
02-03-2025 12:33 AM
Hope you are doing good.
Did my reply answer your question?
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
02-01-2025 01:28 AM
Request you to close your earlier questions by marking appropriate response as correct.
Members have invested their time and efforts in helping and responding to your posts and replies.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader