We're reclaiming inactive PDIs to keep them available for active builders. Learn what's changing, who's affected, and how to protect your work. Read More

need to apply filter on acl

Sweety5
Tera Contributor

Hello everyone , 

                          I need to create one ACL with delete operation for table with following condition :- 

 1 . If they are member of this group "Help Desk"

  2. they have  "u_help_desk" role . 

Kindly suggest me solution for this with best practice .

Thanks in advance !!

 

1 ACCEPTED SOLUTION

Akanksha Gupta2
Mega Guru

Hi , 

Please use this code :-

var abc = gs.getProperty('property name'); 

gs.log(' value is '+ abc);

if(gs.getUser().isMemberOf(abc) || gs.hasRole('sla_admin')) {
answer = true;
}else{
answer = false;
}

Kindly mark it as helpful or correct .

Regards,

Akanksha

View solution in original post

5 REPLIES 5

Ankur Bawiskar
Tera Patron

@Sweety 

It's recommended not to hard-code names or sys_ids

you can create system property of type string and store group name in it

then use that

answer= gs.getUser().isMemberOf(gs.getProperty('propertyName')); // give name of property here

Regards
Ankur

Regards,
Ankur
Certified Technical Architect  ||  10x ServiceNow MVP  ||  ServiceNow Community Leader