Event object accessible in Script Includes
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-03-2024 05:19 AM
Hello community!
I've observed that it is possible to access the 'event' object in Script Includes that were called from Script Action.
That's pretty useful because we can get event.parm1 (and 2) values without actually passing event object to them as an argument.
This happens only for the cases when Script Action and Script Includes are defined in the same scopes.
My question is - is anybody aware if we could have the same thing for cross scope situations? Like when Script Action is in Global scope and the Script Include is within scoped app.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-03-2024 06:45 AM
haven't tried but did you try to access? it might create a cross scope record and what happens if you set it with allowed status?
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-03-2024 11:45 PM
@Ankur Bawiskar that may be a track. But which cross scope do you mean?
The Application Cross-Scope Access on app to which SI belongs (the one that tries to get that 'event' object) is set to 'Tracking', so it records each cross-scope access and auto-allow it.
No other cross scope privileges were recorded.
For Application Restricted Caller Access Privileges there are no records for my custom app. I tried to create some for scoped SI and registered in Global Event, but apparently the OOB ref qualifiers of Target and Source scope fields dont allow to select 'Global' scope when in another field custom scope is selected.