Make a checkbox editable (can be checked by) only a single group of people.

omsa1
Kilo Guru

Hi there,

I have a requirement where only single group of people should able to check the checkbox and should read only to others. How can i do this?

1 ACCEPTED SOLUTION

If the field is set to Read Only in the dictionary, then it will be read


only everywhere in the UI, and can only be programmatically updated.



Read only fields are best used when they are calculated or updated in some


way that isn't manual.



Make it not read only and your ACL will take over.



On Tue, Dec 20, 2016, 6:04 PM omsarah <community-no-reply@servicenow.com>


View solution in original post

8 REPLIES 8

Pradeep Sharma
ServiceNow Employee
ServiceNow Employee

Hello Sarasaamani,



If the data is not dynamically changing on the form, that is, the read-only or edit attribute does not change after the form is loaded, ACLs are recommended. ACLs are evaluated and enforced entirely on the server, making them much more secure than UI policies and client scripts.



You can put the logic(i.e allow only one user and restrict for others) with help of script by creating an ACL on the field level. Please let me know if you have any question.



Reference:


Security Best Practices - ServiceNow Wiki


http://wiki.servicenow.com/index.php?title=Using_Access_Control_Rules


Hi Pradeep,



I've added ACL as below but the field showing read only also for the users in PIR group. Is it because of the field set to read only?



find_real_file.png



find_real_file.png


find_real_file.png


Pradeep Sharma
ServiceNow Employee
ServiceNow Employee

Hello Sarasaamani,



Replace your script with below line.


answer = gs.getUser().isMemberOf( ­'PASS GROUP NAME HERE');



To get an access to the user all conditions has to be met.


Hi Pradeep,



Thank you so much for your help. i removed the script and added role. Its working now.



Sara