- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-27-2018 10:38 AM
I have this BR that helps filters out assignment groups depending on the role. I have this one user that has both sn_customerservice_agent and itil role. But when I impersonate her I'm unable to pull any of the groups up under incidents and case. Can someone help?
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-27-2018 12:11 PM
Here is an example of how you could create an advanced reference qualifier for the 'Assignment group' field on the 'Case' table. You'll start with a script include.
Create a script include that looks just like this...
Here is the script you would use...
function getCaseGroups() {
var groupNames = "Accounts Receivable _ JIB, Revenue, Division Order, Payables, Regulatory, Production Reporting, Lease and Contracts Information, Land and Operations, SCOR Customer Care Center";
return groupNames;
}
Then right-click the 'Assignment group' field label on your 'Case' form and select 'Configure -> Dictionary'.
If your 'Case' table extends from the 'Task' table you'll need to create a dictionary override for the 'Case' table using the related list at the bottom of the dictionary form. You can check the 'Override reference qualifier' box and then supply the reference qualifier value in the 'Reference qualifier' field on the override. Here is the reference qualifier you would use...
javascript: 'nameIN' + getCaseGroups();
You can repeat this same process (changing function names, etc.) with another script include and dictionary override for the incident table.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-27-2018 10:49 AM
right there in bold?
if (gs.hasRole("sn_customerservice_agent") && !gs.hasRole("admin") && gs.isInteractive())
{
var grp = current.addQuery("name", "IN", "Accounts Receivable _ JIB, Revenue, Division Order, Payables, Regulatory, Production Reporting, Lease and Contracts Information, Land and Operations, SCOR Customer Care Center");
}
//This IF statement will restrict to only show ITIL groups 3 and 4
ELSE if (gs.hasRole("itil") && !gs.hasRole("admin") && gs.isInteractive())
{
var grp2 = current.addQuery("name", "IN", "Applicati

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-27-2018 10:49 AM
Yes...Like this
if (gs.hasRole("sn_customerservice_agent") && !gs.hasRole("admin") && gs.isInteractive())
{
var grp = current.addQuery("name", "IN", "Accounts Receivable _ JIB, Revenue, Division Order, Payables, Regulatory, Production Reporting, Lease and Contracts Information, Land and Operations, SCOR Customer Care Center");
}
else if (gs.hasRole("itil") && !gs.hasRole("admin") && gs.isInteractive())
{
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
08-27-2018 10:51 AM
I did that and it works when she's goes into a case ticket. She able to see the top 9 groups, But when she goes into an incident the assignment groups don't show up, the 2nd half of the script.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-27-2018 11:00 AM
Ok..Then you need to join the two queries.
var grp='';
if (gs.hasRole("sn_customerservice_agent") && !gs.hasRole("admin") && gs.isInteractive())
{
var grp = "Accounts Receivable _ JIB, Revenue, Division Order, Payables, Regulatory, Production Reporting, Lease and Contracts Information, Land and Operations, SCOR Customer Care Center";
}
if (gs.hasRole("itil") && !gs.hasRole("admin") && gs.isInteractive())
{
var grp += "2nd set of groups";
}
if (grp!='')
current.addQuery("name", "IN", grp)
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
08-27-2018 11:03 AM