Override reference qualifier to call script include is not giving proper result
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
17 hours ago
Hi All,
I am trying to display the assignment group values based on Assignedto field value in change request. If Assigned to is empty i need to show all the available groups of type itil.
The issue is, I used log statements in script include and observed that script include is getting called and resulting in limited groups as expected. But, on to the change form, when i clicked on the assignment group all the groups are getting shown and no filtering is happening. Do I need to change anything while retuning the records from script include?
Script include:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
17 hours ago
Hi @learn nv
This support link might help you
https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0831564
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
16 hours ago
Hi @learn nv ,
I think you need to make your Script Include is client-callable and returns an encoded query string.
Please refer to the following documentations:
Reference Qualifier: Reference qualifiers
Encoded Query String: Encoded query strings
Hope it will help you.
Thanks & Regards,
Muhammad Iftikhar
If my response helped, please mark it as the accepted solution so others can benefit as well.
Muhammad Iftikhar
If my response helped, please mark it as the accepted solution so others can benefit as well.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
16 hours ago
you should return encoded query from your function
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
15 hours ago
I checked this and it works with the following reference qualifier override on assignment_group on incident table:
javascript:new AssignmentGroupUtils().getAssignmentGroupQuery(current ? current.assigned_to : '');