Make all variables read only on catalog item

samadam
Kilo Sage

I want to make variables read only on a catalog item through onload script when certain conditions are met. Tried the options in

https://community.servicenow.com/community?id=community_question&sys_id=ae4560e6dbe453c4852c7a9e0f96...

but could not get it working. Any ideas?

7 REPLIES 7

Mark Roethof
Tera Patron
Tera Patron

Hi there,

Do you want this on Platform UI or Service Portal?

And do you are actually mean Requested Item instead of Catalog Item?

If my answer helped you in any way, please then mark it as helpful.

Kind regards,
Mark
2020 ServiceNow Community MVP
2020 ServiceNow Developer MVP

---

LinkedIn
Community article list

 

Kind regards,

 

Mark Roethof

Independent ServiceNow Consultant

10x ServiceNow MVP

---

 

~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field

LinkedIn

This is on Service Portal, Its on catalog item. 

Hi,

I believe this you require on RITM view i.e. once request has been submitted so that user doesn't edit the variable values.

why would you require all variables to be read-only while raising the request/catalog? this would not allow users to change the value before submission

Regards
Ankur

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

Adrian Ubeda
Mega Sage
Mega Sage

Hi, 

Try to create a catalog UI Policy applied to your item and with your custom conditions. Inside you set each variable to readOnly, also if your conditions are based on user/groups you should consider create ACL instead using client script side.

If it was helpful, please give positive feedback.
Thanks,

If it was helpful, please give positive feedback! ✔
☆ Community Rising Star 22, 23 & 24 ☆