- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-27-2025 03:39 AM
I have a client script calling script include to populate some data in form.
The client script is working in Classic UI but not working from SOW.
I have updated Desktop Type as "ALL"
I tried SOW view also.
I tested that Script include call is not working from SOW.
How to solve this..?
Other client scripts that have no script include call are working in SOW without update any view. View is Global.
Does Script Include work from SOW by
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-28-2025 12:45 AM
so what debugging did you perform in your client script.
Did you check if logs came? any browser console error when the onchange runs
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-28-2025 01:49 AM - edited 02-28-2025 01:50 AM
Hello @AnnuK
I have rebuilt your code. Please verify the screenshots below. Also, please cross-check the yellow highlighted area in your Client Script and Script include.
Script Include
1. In the script include, you will have to define "ID" variable as this.getParameter("sysparm_id");
2. The value of ID should be your Configuration Item.
3. Make sure cmdb_rel_ci is giving you the expected result with harcoded values before running the script
4. Isolate Script check box should be true
Result:
Thank You!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-27-2025 03:46 AM
ideally should work
Don't specify any view in client script and let it run for all views
are you sure there are no browser errors?
share your client script and script include scripts and their 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
02-27-2025 03:52 AM
Hi @AnnuK ,
Check if you have specified any Access Control to your script include, make sure the logged in user is a member of it.
Mark this as Helpful / Accept the Solution if this helps.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-27-2025 04:08 AM
Hello @AnnuK
Ideally, it should work. But still, if we can cross-check the client script and script include it will be helpful. Attaching sample script, see if it is giving the alert message or not
Onchange script:
While creating the script include add snc_internal role to it, see if it works for you!
Result: In my instance, an alert has been printed on the platform as well as on SOW.
If it helped, please accept the solution and mark it as helpful
thanks!
Thank You!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-27-2025 11:49 PM
@Rushi Savarkar thank you. This code is working in SOW?
This is my client script.
Below is script Include
Above code works in UI but not in SOW. The script include call is not working.