How to make incidents hidden by a specific assignment group

Joshua Comeau
Kilo Sage

Wanting to add new assignment group IT Security Incidents:

Would like this group to have its incidents only visible to members of the group.

EX: Any incidents assigned to this group only make them visible.

1 ACCEPTED SOLUTION

I believe the example on the link I posted previously aligns with your exact use case scenario... Add a data filter for your data filtration rule (servicenow.com)

jMarshal_0-1707155247313.png

 

View solution in original post

13 REPLIES 13

I would absolutely recommend testing on a sub-prod instance first...but I do not think there's any demo data or pre-configured filters that will affect your instance. Further, I'm quite certain this is a core platform feature with no additional costs or subscription fees! Good luck! 🙂

It seems you have created a role. Add below in the script (set the Advance checkbox to true on the form for script field to show up).

if(gs.getUser().isMemberOf('IT Security Incidents') && gs.hasRole('hide_it_sec_incidents'))
{
answer=true;
}
else{answer=false;
}

 

did not work 

siva krishna M2
Tera Guru

Hello @Joshua Comeau 

 

Kindly create before query  advanced business rule with below script.

 

if(gs.getUser().isMemberOf("group A name")

{

current.addQuery('assignment_group',group A sys_id)

}

Replace group A name with name of group A

Replace group A sys_id with sys_id of group A.

 

This business rule checks whether login user is member of group A or not. If he is member of group A then it allow to user to see only his group A assigned incidents.

 

If my response is useful, then kindly mark it as "Accept as Solution" and " Helpful."