Error when calling script include in filter, need help.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-24-2025 08:12 AM
I'm attempting to call a function within a script include that returns a comma separated list of sysID's. Everytime I try to run the query I get an error in the log:
Not allowing access to script include rhino.sandbox.TeamMembersWithITIL
Script include is not callable from the sandbox: no thrown errorand this warning
com.glide.script.RhinoEcmaError: "TeamMembersWithITIL" is not defined.
<refname> : Line(1) column(0)
==> 1: new TeamMembersWithITIL().getUserIDs();
Stack trace:
at <refname>:1
Table im adding the function to is sys_user and is called in the filter via this:
sys_idINjavascript:new TeamMembersWithITIL.getUserIDs();
The script include is in global scope, tried client callable (true/false with and without ACL), even tried using ajax processor but nothing seems to work.
I don't think the issue is the script because when I execute it from xplore via the below command, it works.
var itil = new TeamMembersWithITIL();
gs.print(itil.getUserIDs());What is blocking me from using this?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-24-2025 08:24 AM
Hi @kenetienne ,
Try this:
javascript: 'sys_idIN'+ new TeamMembersWithITIL().getUserIDs();
Thanks
Anand
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-24-2025 08:25 AM
Hi @kenetienne ,
If your goal is to filter a user reference field to only show ITIL users:
Go to the dictionary entry for the reference field.
Set the reference qualifier to:
roles.name=itil.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-24-2025 08:51 AM
@kenetienne Since you mentioned script include is in global scope can you try calling by adding new global.TeamMemebersWithITIL().getUserIDs().
Try using this format: javascript: "sys_IdIN" +new global.TeamMemebersWithITIL().getUserIDs().
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-24-2025 11:09 AM
Your reference qualifier is missing the () after the Script Include name. If this field/variable is not in the global scope, be sure to use the full API name in the reference qualifier when calling the Script Include. If those two don't work, since the error mentions the sandbox, try checking that box on the Script Include definition
