Best way to disable all fields at form level and list view both

ServiceNow Adm1
Giga Contributor

What would be the best way to disable all fields or make fields read only at form and list view level? When a record reaches at one stage, I want to make all fields read only and only admins should be able to modify them.

What is your suggestion to implement this, without editing existing configuration/data?

ACLs?

UI Policies?

Data Policies?

Client scripts?

I am looking for best and the easiest way to do this

 

4 REPLIES 4

Alikutty A
Tera Sage

You can write a table or field level ACL rule (eg State is Closed) and allow access only to admin users. This will prevent edit at both form and list layouts and is the easiest way to set it up.

Thanks!

table level ACL with write operation?

Add a condition state is closed and role as admin... right?

Yes write ACL at table level and you can also use admin override checkbox.

Ruhi Jibhyenka1
Mega Guru

Hi Sri,

You can use UI policies to make fields read only at form and you can use ACLs by writing ACL rule to restrict for modification on forms by others except admins as per your condition.

Check this out-

Example:

Have a write ACL on that field for that table and select checkbox for advanced and add following script in that:

answer = isEditable();

function isEditable(){

 

if(gs.hasRole("admin")){

     return true;

}

    return false;

}

Mark Correct if this solves your issue and also mark Helpful if you find my response worthy.

Thanks,

Ruhi.