- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-11-2022 03:22 AM
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 !!
Solved! Go to Solution.
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-14-2022 04:47 AM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-11-2022 03:24 AM
Hi Sweety
Did you tried anything so far?
1. in your script part use below statememt
answer= gs.getUser().isMemberOf('group name/sysid');
2. in Requires Roles section , specify the role.
Mark it helpful if this helps you to understand. Accept solution if this give you the answer you're looking for
Kind Regards,
Rohila V
2022-25 ServiceNow Community MVP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-11-2022 03:34 AM
I'll try this .
Thank you for your response
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-14-2022 03:44 AM
can we use system property to store sysid of group?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-14-2022 04:47 AM
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