- 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 12:51 PM
When I added sys_user_group to the top of the script she's able to view the 9 groups under case, but when I go to incident no assignment groups shows up .

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-27-2018 12:58 PM
I think you should have had it as current.addQuery("assignment_group.name", "IN", grp);
var grp='';
if (current.getTableName()=='sn_customerservice_case' && gs.hasRole("sn_customerservice_agent") && !gs.hasRole("admin") && gs.isInteractive())
{
grp = "Accounts Receivable _ JIB, Revenue, Division Order, Payables, Regulatory, Production Reporting, Lease and Contracts Information, Land and Operations, SCOR Customer Care Center";
}
if (current.getTableName()=='incident' && gs.hasRole("itil") && !gs.hasRole("admin") && gs.isInteractive())
{
if (grp!='')
{
grp = grp+','+"Application Server & Middleware Administration, Asset Management, Audio Visual & Conferering, Backup & Restore, Business Services, Collaboration, Data Center Management, Database Administration, Desktop Architecture, Desktop Support, Developers, Document Controllers, Document Management Applications, Domestic Fleet Printer Support, East Med Support, eDiscovery, EMED Allegro, EMED CMMS, EMED IT OPS, EMED PI, Enterprise Infrastructure Applications, Enterprise Infrastructure Systems, Enterprise Planning Administration, ERP Applications, Generwell Support, Geo Science Computing, Geo Science Subscription Administration, Information Security & Compliance, IT Administration, ITSM Administration, Knowledge Management, Mobility, Networking, Operation Excellence, Operations Application, OracleEBS_Accounts Receivable SMEs, OracleEBS_Assets SMEs, OracleEBS_Capital SMEs, OracleEBS_Cash Management SMEs, OracleEBS_Division Order SMEs, OracleEBS_Enterprise Asset Management SMEs, OracleEBS_General Ledger SMEs, OracleEBS_GTM SMEs, OracleEBS_Human Resources SMEs, OracleEBS_iExpense SMEs, OracleEBS_International IT SMEs, OracleEBS_Inventory SMEs, OracleEBS_JVA SMEs, OracleEBS_Master Data Management SMEs, OracleEBS_OLM SMEs, OracleEBS_Payables SMEs, OracleEBS_Payroll SMEs, OracleEBS_Procurement SMEs, OracleEBS_Recruitment SMEs, OracleEBS_Regulatory SMEs, OracleEBS_Revenue SMEs, OracleEBS_RTP SMEs, OracleEBS_Tax SMEs, PIMs SME, Procurement, Reporting & Analytics, Reporting & Analytics - Hyperion, SCADA Support, Service Desk, SharePoint, SOA Support, SOX, Survey, System Architecture, Tech Lead, User Administration, VoIP";
}
else
{
grp="Application Server & Middleware Administration, Asset Management, Audio Visual & Conferering, Backup & Restore, Business Services, Collaboration, Data Center Management, Database Administration, Desktop Architecture, Desktop Support, Developers, Document Controllers, Document Management Applications, Domestic Fleet Printer Support, East Med Support, eDiscovery, EMED Allegro, EMED CMMS, EMED IT OPS, EMED PI, Enterprise Infrastructure Applications, Enterprise Infrastructure Systems, Enterprise Planning Administration, ERP Applications, Generwell Support, Geo Science Computing, Geo Science Subscription Administration, Information Security & Compliance, IT Administration, ITSM Administration, Knowledge Management, Mobility, Networking, Operation Excellence, Operations Application, OracleEBS_Accounts Receivable SMEs, OracleEBS_Assets SMEs, OracleEBS_Capital SMEs, OracleEBS_Cash Management SMEs, OracleEBS_Division Order SMEs, OracleEBS_Enterprise Asset Management SMEs, OracleEBS_General Ledger SMEs, OracleEBS_GTM SMEs, OracleEBS_Human Resources SMEs, OracleEBS_iExpense SMEs, OracleEBS_International IT SMEs, OracleEBS_Inventory SMEs, OracleEBS_JVA SMEs, OracleEBS_Master Data Management SMEs, OracleEBS_OLM SMEs, OracleEBS_Payables SMEs, OracleEBS_Payroll SMEs, OracleEBS_Procurement SMEs, OracleEBS_Recruitment SMEs, OracleEBS_Regulatory SMEs, OracleEBS_Revenue SMEs, OracleEBS_RTP SMEs, OracleEBS_Tax SMEs, PIMs SME, Procurement, Reporting & Analytics, Reporting & Analytics - Hyperion, SCADA Support, Service Desk, SharePoint, SOA Support, SOX, Survey, System Architecture, Tech Lead, User Administration, VoIP";
}
}
if (grp!='')
{
gs.addInfoMessage('++++Final List of Group++++'+grp);
current.addQuery("assignment_group.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 01:18 PM
I updated that and case still shows 77 groups. But incident shows up now.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-27-2018 01:23 PM
Please refer to my responses below. This will not work with a query business rule. You need to create advanced reference qualifiers. I've given you an exact solution, you just need to implement it.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-27-2018 01:27 PM
Confirm, you are viewing it on a List view of the table.
If you are on a record and clicking on Search Group, you need to use Reference qualifier as suggested by Mark.
If you are talking about a list and you want to Preset filter for the user on the list view, you should use below.
var grp='';
if (current.getTableName()=='sn_customerservice_case' && gs.hasRole("sn_customerservice_agent") && !gs.hasRole("admin") && gs.isInteractive())
{
grp = "Accounts Receivable _ JIB, Revenue, Division Order, Payables, Regulatory, Production Reporting, Lease and Contracts Information, Land and Operations, SCOR Customer Care Center";
}
else if (current.getTableName()=='incident' && gs.hasRole("itil") && !gs.hasRole("admin") && gs.isInteractive())
{
grp="Application Server & Middleware Administration, Asset Management, Audio Visual & Conferering, Backup & Restore, Business Services, Collaboration, Data Center Management, Database Administration, Desktop Architecture, Desktop Support, Developers, Document Controllers, Document Management Applications, Domestic Fleet Printer Support, East Med Support, eDiscovery, EMED Allegro, EMED CMMS, EMED IT OPS, EMED PI, Enterprise Infrastructure Applications, Enterprise Infrastructure Systems, Enterprise Planning Administration, ERP Applications, Generwell Support, Geo Science Computing, Geo Science Subscription Administration, Information Security & Compliance, IT Administration, ITSM Administration, Knowledge Management, Mobility, Networking, Operation Excellence, Operations Application, OracleEBS_Accounts Receivable SMEs, OracleEBS_Assets SMEs, OracleEBS_Capital SMEs, OracleEBS_Cash Management SMEs, OracleEBS_Division Order SMEs, OracleEBS_Enterprise Asset Management SMEs, OracleEBS_General Ledger SMEs, OracleEBS_GTM SMEs, OracleEBS_Human Resources SMEs, OracleEBS_iExpense SMEs, OracleEBS_International IT SMEs, OracleEBS_Inventory SMEs, OracleEBS_JVA SMEs, OracleEBS_Master Data Management SMEs, OracleEBS_OLM SMEs, OracleEBS_Payables SMEs, OracleEBS_Payroll SMEs, OracleEBS_Procurement SMEs, OracleEBS_Recruitment SMEs, OracleEBS_Regulatory SMEs, OracleEBS_Revenue SMEs, OracleEBS_RTP SMEs, OracleEBS_Tax SMEs, PIMs SME, Procurement, Reporting & Analytics, Reporting & Analytics - Hyperion, SCADA Support, Service Desk, SharePoint, SOA Support, SOX, Survey, System Architecture, Tech Lead, User Administration, VoIP";
}
if (grp!='')
{
gs.addInfoMessage('++++Final List of Group++++'+grp);
current.addQuery("assignment_group.name", "IN", grp);
}
Please mark this response as correct or helpful if it assisted you with your question.