Call script include to a Reference field in a variable set
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
4 weeks ago
I have a Business Service Field i want to filter using a call to a script include. Yes this could be done user simple but this is a small sample to a bigger issue. Im having issues calling to a script include from a reference qualifer variable in a variable set. Works fine if it was a field on a form.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
4 weeks ago
Hi @ServNowDev ,
Your Script Include's code is not client callable:
It should be like below:
Please check the below working script:
Mark this as Helpful / Accept the Solution if this helps.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
4 weeks ago
@ServNowDev your script include is not client callable, so probably what went wrong here is that you created the script include and checked the "client callable" later or you deleted the client callable script include syntax, maybe by mistake.
Client callable script include syntax, calls the abstract class, so simplest fix here is to delete this SI and create a new script include with client callable checked (syntax will auto appear) and then write your function.
Note: Client callable SI will prompt you to add role to that, which will create a client callable script include ACL in backend, you can add the role as per your need (only that role will be able to execute this SI).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
@ServNowDev Were you able to get this fixed.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
4 weeks ago - last edited 4 weeks ago
Hi @ServNowDev
if you want to mark “client callable” I recommend use glideAjax in catalog client script
https://www.servicenow.com/community/developer-articles/glideajax-example-cheat-sheet/ta-p/2312430
If not, unchecked this box and in your script include, may you try
getTest: function() {
return 'active=true;
}