Service catalog

ShaibaazFaheem
Tera Contributor

Hi Community! In the service portal, there is a field "approver" which is a reference field and I wanted to make it read only. Since the field is not a variable set, it is a custom field inside a custom Service Portal cart widget. Catalog UI policy/client script will not work. How to make the field read only? Detailed answer would be highly appreciated.

2 REPLIES 2

Brad Bowman
Mega Patron

If it's a field, treat it like any other field.  Since it's a custom field you'll have to find the table it's on, then you can make it read only at the dictionary level, or with a table-level UI Policy or Client Script.

Tanushree Maiti
Tera Sage

Hi @ShaibaazFaheem 

 

To make an approver reference field read-only in a custom Service Portal cart widget, the most effective method in ServiceNow is to use AngularJS directives within the HTML template or manipulate the field via the Client Controller.

 

Refer: https://www.servicenow.com/community/developer-forum/make-all-fields-read-only-in-custom-widget/m-p/...

 

https://www.servicenow.com/community/developer-forum/read-only-field-on-service-portal-only/m-p/1773....

 

 

 

Please mark this response as Helpful & Accept it as solution if it assisted you with your question.
Regards
Tanushree Maiti
ServiceNow Technical Architect
Linkedin: