
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
â04-14-2022 05:40 AM
I am currently using UI Policies to make variables read only but I've since noticed that you can select 'variables' on the data policy module. I have created a data policy on [sc_req_item] and set 'variables' to read only but it hasn't worked. I created a data policy to set the 'Number' attribute to read only and that worked.
I've also noticed on the data policy a related link 'Convert this to UI policy'. It's got me thinking, is UI policy ServiceNow's preferred method? Has there been a shift over the years to use UI policies instead? Or possibly is there another reason why this isn't working?
Solved! Go to Solution.
- Labels:
-
Service Catalog
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
â04-14-2022 05:58 AM
Purpose of data policy is to validate the database level updates whereas UI policy mainly executes on a browser at client side. Both are still relevant BUT they serve different usecases.
In the field that you have made readonly via data policy, try to update it using background script and see for yourself if you are able to update it. You wont see that made readonly on UI via data policy though.
Go with UI Policy if you want the field/variable to be readonly/mandatory on UI at client side.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
â04-14-2022 05:58 AM
Purpose of data policy is to validate the database level updates whereas UI policy mainly executes on a browser at client side. Both are still relevant BUT they serve different usecases.
In the field that you have made readonly via data policy, try to update it using background script and see for yourself if you are able to update it. You wont see that made readonly on UI via data policy though.
Go with UI Policy if you want the field/variable to be readonly/mandatory on UI at client side.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
â04-14-2022 07:19 AM