Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

How can we restrict incidents based on assignment group?

Raj90
Tera Guru

Hi All,

I have one requirement 

Group 1 having users(User 1 & User 2) and Group 2 having users(User 3 & User 4)

Group 1 users will see their incidents only and not see other incidents(Group 2)

How can we restrict incidents access or view by using Support role and Group 1 group.

 Group 1Group 2
UsersUser 1, User 2User 3, User 4
RolesITIL, Support ITIL, Support
7 REPLIES 7

Ashvini Kadus1
Kilo Guru

Hi Raj,

You have to write below code in Write ACL script of Incident table:

 

if(gs.getUser().isMemberOf(current.assignment_group)){

answer=true;

}

 

Kindly mark answer as correct or helful if it helps you to solve your problem.

 

Thank You,

Ashvini k

tried it but didnt work

SudhirOjha
Mega Guru

HI Raj ,

 

Did you get the solution for this?

Thanks

Sudhir