- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-14-2025 07:12 AM
I have an offboarding form that was built by our initial implementor. Within the form they have built two fields for Current Assets the person being offboarded has. The first is a script that goes into the CMDB and looks up any record that has the "User" in the Assigned_to field. The second is just a straight multi-line text the is available if the first script doesn't find anything.
The issue I seem to have is that when the form is being opened the onChange script doing the look up does not appear to work if the person does not have sufficient rights (ITIL). I have checked and the flow is set up as system but given this is part of the catalog design and a script is there a way to make the script run as admin. Do I need to convert this to a script include?
Below is the script being used.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-14-2025 09:56 AM
Using a GlideRecord in a Client Script is not recommended as a best practice, nor supported. Use GlideAjax to call a script include https://www.servicenow.com/community/developer-articles/glideajax-example-cheat-sheet-updated/ta-p/2...
or getReference https://www.servicenow.com/docs/bundle/yokohama-api-reference/page/app-store/dev_portal/API_referenc...
or see if the Variable Auto-Populate feature will work in this case.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-14-2025 09:56 AM
Using a GlideRecord in a Client Script is not recommended as a best practice, nor supported. Use GlideAjax to call a script include https://www.servicenow.com/community/developer-articles/glideajax-example-cheat-sheet-updated/ta-p/2...
or getReference https://www.servicenow.com/docs/bundle/yokohama-api-reference/page/app-store/dev_portal/API_referenc...
or see if the Variable Auto-Populate feature will work in this case.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-14-2025 12:17 PM
I don't think the auto-populate will work in this context as it is an array. I was already kind of leaning towards the script include so I will investigate that option further.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-14-2025 12:53 PM
Thanks for the help Brad, apparently the implementer did a script include actually shows up in the pasted code I had, the issue was the ACL was set to ITIL instead of a lower permissiblity level. Typically the user submitting the form would be a Business_Stakeholder or User so adjusted the ACL and now working!