How to give a ACL access to particular group?

Deepika Ravindr
Tera Contributor

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.

10 REPLIES 10

Community Alums
Not applicable

Hi @Deepika Ravindran ,

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

Hi,

  I am tried but It's not working..

Chandu Telu
Tera Guru
Tera Guru

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

Prasad Pagar
Mega Sage

Hi @Deepika Ravindran 

Are you selecting correct values in Name field?

 

find_real_file.png

 

Also code shouldbe 'gs.getUser().isMemberOf('GROUPA')'

Thank you
Prasad