The Zurich release has arrived! Interested in new features and functionalities? Click here for more

Client script for blocking edits in list view

catchdini
Tera Expert

I have a requirement to use a client script, which should not allow editing in the list view for the incidents that are closed. Basically, if the incident is closed, then no matter which field I try to change in the list view, I shouldn't edit. How do I achieve this?

1 ACCEPTED SOLUTION

Hi Brad, I have used the below condition (in pic) to block editing in list view for closed incidents. I have some questions in this, can you plz clarify? Though the questions might look easy, but it will help me clarify/understand ACL's better.


- The specified condition is "Incident State is not Closed", though the condition that I wanted is "Incident State is Closed". Why I have to give condition in the reverse way?


- I have added the admin in 'Sys User Role' (its not in the below pic). I added admin role thinking that admin will be able to edit the closed incidents in list view but admin is also not able to edit. I didnt understand why.



ACL-Incident.jpg


View solution in original post

8 REPLIES 8

Slava Savitsky
Giga Sage

Never rely on client-side scripts in security matters. Use ACLs instead.


ChrisBurks
Giga Sage

Here are some other options for restricting editing on lists:



Click here: Client Script Best Practices - ServiceNow Wiki


Thanks Chris, will go through and try to make use of it and come back when I get stuck


Ivan Martez
ServiceNow Employee
ServiceNow Employee

Access Controls are you best bet. You can create write ACL's for this or list edit ACL's if it only needs to be list specific.