Show cases rows only to the assignment group

JohnDF
Mega Sage

Hi,

Is there a way to define that only the assignment group could see her cases rows?

I tryed a before BR on case table, but it not working like on incident table and I don't know why.

 

JohnDF_0-1702495788010.png

 

 

Advanced Condition is: gs.getSession().isInteractive() 

 

(function executeRule(current, previous /*null when async*/) {

	// Add your code here
	var myUserObject = gs.getUser();


      var myUserGroups = myUserObject.getMyGroups();


      var groupsArray = new Array();


      var it = myUserGroups.iterator();


      var i=0;


      while(it.hasNext()){


              var myGroup = it.next();


              groupsArray[i]=myGroup;


              i++;


      }



var qc = 'assignment_group.sys_idIN'+groupsArray;


current.addEncodedQuery(qc);

})(current, previous);

Why is this code not working on cases?

 

Thanks for help!

1 ACCEPTED SOLUTION

malaviya
Kilo Expert

Try writing an ACL instead of BR.

View solution in original post

6 REPLIES 6

hi @Ethan Davies 

 

this doesn't work either. The user can see all cases with role customer service agent.
deactivated already all other query business rule.

 

Do you testet this on cases? Something else in csm should block this query business rule

malaviya
Kilo Expert

Try writing an ACL instead of BR.