How to give a ACL access to particular group?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-02-2022 12:01 AM
Hi,
I have one requirement like need to give a access to particular Group in particular one field. I was tried but it's not working if i am doing. wrong please correct me
I have one Script but it's not working
if(gs.isMemberOf('GROUP A')){
answer = true;
}else
{
answer = false;
}
For example i have a one group that group name is GROUP A, Now i need to give a access to GROUP A members to edit the comments field only remaining to show read only for that GROUP A members.
- Labels:
-
Team Development
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-02-2022 12:11 AM
Hi
Create an ACL for create and Write and put this code there, that should work.
In the script, put the code like below:
if(gs.getUser().isMemberOf("your group NAME")){
answer = true;
gs.log(gs.getUser().isMemberOf("your group NAME"),"acl working now");
}else
{
answer = false;
}
Mark my answer correct & Helpful, if Applicable.
Thanks,
Sandeep
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-02-2022 02:25 AM
Hi,
I am tried but It's not working..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-02-2022 12:11 AM
Hi Deepika Ravindran,
Check this link
https://community.servicenow.com/community?id=community_question&sys_id=bfa00765db98dbc01dcaf3231f96194d
You need the use the code link
gs.getUser().isMemberOf(current.assignment_group.toString())
Please Mark the answer if correct/helpful , if it helps

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-02-2022 12:12 AM