Any use case of 'Execute in sandbox' and 'execute as scriptlet' in scripts background?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-05-2025 11:35 PM - edited 01-06-2025 05:08 AM
We have 'Execute in sandbox' and 'execute as scriptlet' in scripts background. Are there any use cases of it? Any example scenarios of its usage?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-06-2025 12:35 AM
Hi @Suggy ,
- Execute in sandbox : Allows script to run with sandbox like restrictions. If checked, data cannot be inserted, updated, or deleted.
- Execute as scriptlet : Allows the script to execute as a scriplet, which gives the script access to the global scope and any server-side functionality or objects. If the check box is not selected, the script executes in global scope, but does not have access to any server-side functionality or objects.
Please refer below docs for more understanding of this, you can relate your use case as per this documentation.
https://developer.servicenow.com/blog.do?p=/post/training-scriptsbg/
Please check and Mark Helpful and Correct if it really helps you.
Regards,
Mayur Shardul
ServiceNow Rising Star 2024
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-06-2025 05:07 AM
I have already read that 🙂
That was not my question by the way 🙂
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-23-2025 05:48 PM
What exactly is your question?
Mayur's answer was the correct answer to what you were asking. Use sandbox when you want to prevent inserts / deletes / updates as a way of testing a script. Use scriptlet when you want server-side functionality. Those are the use cases for those options.
For more info on server-side scripts see the following docs,
https://www.servicenow.com/docs/bundle/xanadu-api-reference/page/script/server-scripting/concept/c_S...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-09-2025 11:01 AM
Anyone?