Query Business Rule Script Issue

DKSINGH
Tera Contributor

Hi All,
I have 12 different SUP groups using a custom view and I have requirement where groups from C1 to C11 should be able to see there specific incidents assigned to their queue and nothing else and C12 members should be able to see all the Incidents assigned any group within that view.

---------------------------------------------------------

Approach which I tried is creating different Query Business Rule for each group, that solves my purpose till 80% , but as it is a custom view they are also able to see INC's assigned to teams on default view which should not happen.

If anyone can assist to solve the 2nd part, I will be thankful.

1 REPLY 1

Sanket Landge
Tera Expert

Hello @DKSINGH,

I think you can do with single query business rule as well.

 

You can use the Switch or if {} else if {} block for all the c1 to c12 groups and check.

gs.getUser () and then access methods from this object, like isMemberOf ("Group Name");

For view :

var gr = new GlideRecord('sys_ui_view');
gr.get(RP.getViewID()); 

 

For C12 check your view using above script and do you validation

 

Please mark answer helpful or correct if this works.

 

Thanks,

Sanket Landge