Assignment group filter based on "Vendors" of Groups
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-24-2018 10:33 PM
I have below requirement:
The assignment group on incident form should show only those groups which have logged in user's company in their "Vendors" field
For Example : Logged-in User's company is - Company1
there are three groups - Group1(vendors - Company1,Company2) , Group2 (vendors - Company1) , Group3 (vendors - company3)
Now when the logged in user goes to incident form and clicks on Assignment group,it should show only two groups - Group1 and Group2

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-24-2018 10:51 PM
HI SMita,
We have to write a reference qualifier and script include which will be called in reference qualifier.
Let me know if you want script.
Thanks,

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-24-2018 10:52 PM
You can write a script include and call it using advance qualifier.
var id = '';
var grp = new GlideRecord('sys_user_group');
grp.addQuery('vendor','CONTAINS',javascript:gs.getUser().getCompanyID());
grp.query();
while (grp.next())
{
if (id!='')
id = id+','+grp.sys_id;
else
id = grp.sys_id;
}
return 'sys_idIN'+id;
Please mark this response as correct or helpful if it assisted you with your question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-24-2018 11:17 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-24-2018 11:23 PM
Dont make it client callable. Also correct this line to grp.addQuery('vendor','CONTAINS',gs.getUser().getCompanyID());
Please mark this response as correct or helpful if it assisted you with your question.