Can i call script include from scripted rest api
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-06-2024 05:31 AM
Hi,
Is there is a way where we can call script include (global scope) from Scripted Rest Api ( different scope than global)?
Thanks in Advance😊

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-06-2024 05:39 AM
Hi @anvitha ash yes you can call, ensure your script include accessible from field is set to all application scope and in Scripted Rest api you can call like this
var si = new global.scriptincludeName().functionName();
Harish
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-06-2024 05:42 AM
Hi Ash,
sure you should be able to do it. Since you have mentioned that it is in a different scope I would try something like that:
Lets say your script include name is: "MyScriptInclude"
"var myinclude = new script_include_scope_prefix.MyScriptInclude();"
of course remmeber to replace the script include name to the one you have and replace
"script_include_scope_prefix" with the actual scope value.
If helps please mark it as useful or accept it as a solution.