Set Name-Value pairs field to read-only on form

Community Alums
Not applicable

Hi,

 

I'm struggling to get a name-value pairs type field to be read-only on a form:

 

tscott_0-1738067219849.png

 

Using a UI policy doesn't work, and I've tried a few variations of client scripts (based upon a search on here), including some that do DOM manipulation, but nothing seems to work!

 

Has anyone managed to do this (I'm on Vancouver).

 

Thanks!

1 ACCEPTED SOLUTION

Sandeep Rajput
Tera Patron
Tera Patron

@Community Alums Did you try making the field read only via a write ACL?

View solution in original post

5 REPLIES 5

Sandeep Rajput
Tera Patron
Tera Patron

@Community Alums Did you try making the field read only via a write ACL?

Community Alums
Not applicable

Yes, I have done it via ACL, but would have preferred to do it via a UI policy! 

@Community Alums Unfortunately, making a key value pair field read only is not supported via UI Policy. 

Ankur Bawiskar
Tera Patron
Tera Patron

@Community Alums 

Field level WRITE ACL is the only way.

Client script or UI policies don't work for Name-value field type

OR

you can try to use DOM manipulation and even if it works I won't recommend that as it's not a best practice.

If my response helped please mark it correct and close the thread so that it benefits future readers.

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