Calling a private scope script include with scoped app
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-30-2022 02:29 AM
Hi ServiceNow Experts,
I am developing a scoped app and have a requirement of executing a script include which is only accessible from a particular scope. This SI needs an input param to be passed dynamically every time scoped app is executed. The scope of SI cannot be changed to "accessible to all scopes".
What are ways of executing this SI from a scoped app?
Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-30-2022 02:39 AM
Hi,
As per my understanding the script include can only be invoked from outside the scope once you make it Accessible from all scopes
Other than that I don't think anything can be done
Let's wait for other members to comment.
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-30-2022 02:45 AM
Hi,
That will be a tricky one.
A workaround would be to create another script include in the other scope, and set it to be accessible to all scopes.
And then in that new script include, call the script include, which is only accessible from within the same scope.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-30-2022 03:23 PM
PN me, i will write you a script that allows you to do this. I am not going to post this publicly here because this is
- A big security issue
- Will be patched (hopefully) in the future
EDIT: Seems there is no Personal Message functionality in this forum? If you send me your mail i'll send you the hack
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-30-2022 09:51 PM
Thanks everyone for your help.
I got a workaround. I am creating/updating a sys property with the required input value using the scoped app. I have also created a scheduled job within the scope where SI is available. This Job picks the input value from sys property and executes the private SI.