How to execute a scoped application UI script (not Global script) from UI policy run script,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-30-2023 01:43 PM
I have a need to execute a scoped application UI script (not Global script) from UI policy run script, I have various options, but it won't execute. Below is a very simple sample script that I am trying to execute from UI policy run script and UI Script. Any guidance will help.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-30-2023 01:57 PM - edited 05-30-2023 01:57 PM
Try setting up Runtime Access Tracking | ServiceNow Developers
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-30-2023 02:12 PM
Hi jMarshal, Thanks for your suggestions. In this case both the UI Script and UI Policy are in the same scope not cross-scope.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-30-2023 02:17 PM
Sorry, thought you were looking to access script from a custom app IN global scope...
wouldn't you just use a Script Include for this, then? Put the script from the UI Policy there and reference it in both spots.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-30-2023 03:50 PM
Yes, that I can do and that works. Also, global UI Script works.
But I am trying to create reusable UI Script within my scoped application that will call the script include in scoped application with dynamic arguments. This would help us to call UI script within a client script or UI policy. Just trying keep all script within scoped application which a custom application.