Error when calling script include in filter, need help.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 hours ago
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 error
and 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
2 hours ago
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
2 hours ago
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
2 hours ago
@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().