How to give permissions for a particular group menbers on a table to create new records

Nag9
Tera Expert

I have a table titled as "service request', Now irreescpective of all the users have persmission to create new records.

Query: i have group titled as 'Requested members' in that 5 group members are available, for that 5 members only have permissons to create records on that table.

How can we acheive this

?

 

 

1 ACCEPTED SOLUTION

Hi Nag,

Create an ACL for create and Write and put this code there, that shoudl 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;
	}

 

View solution in original post

11 REPLIES 11

Ankur Bawiskar
Tera Patron
Tera Patron

Hi Nag,

I believe this you want

1) only those 5 users belonging to that group should be able to create new record into that table

best way is to have a custom role created and assign to this group so the 5 members automatically receive that role

update table.None create ACL and give this role

so what happens when ACL is evaluated it checks whether logged in user has that role if yes then show new button

one good thing in future would be if you want to add 1 more member and give access to create; directly add that to this group and that user will automatically inherit the group role so no need to change ACL

Mark Correct if this solves your issue and also mark Helpful if you find my response worthy based on the impact.
Thanks
Ankur

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

asifnoor
Kilo Patron

Hi Nag,

First, you need to add these users to 1 role so that tomorrow if you want to give access to 6th user, you can simply assign this role to that user.

Once the role is created, then create an ACL with None and give access to the new role created. Then this will restrict the creation of records only to the users having this role.

Mark the comment as a correct answer and also helpful once worked.

alert('testedmif'); if(gs.getUser().isMemberOf('9a2eb66ddb468f00f3e5f156bf96195b')) { alert('check the mebers'); current.omit_new_button = true; } else { current.omit_new_button = false; } Im trying this code in list control of that table Still its not wrking Can u check this one I want omit the new button for admins also How can we find the users who have admin roles??

Hi Nag,

Create an ACL for create and Write and put this code there, that shoudl 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;
	}