Find your people. Pick a challenge. Ship something real. The CreatorCon Hackathon is coming to the Community Pavilion for one epic night. Every skill level, every role welcome. Join us on May 5th and learn more here.

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

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

@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

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

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

@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  ||  10x ServiceNow MVP  ||  ServiceNow Community Leader