what is data policies at server side ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-06-2022 01:56 AM
What is data policies? & UI policies?
What is the difference between UI policy and Data policies in server client side?
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-06-2022 01:58 AM
Hi Tabassum,
UI policy is used to make any field on the form as Mandatory, ready-only or visible based upon the conditions. this is the easiest method without any coding. dynamically you can make a field mandatory, or read-only or visible based upon the conditions.
data-policy is also similar, but data policy will be useful at the time when you are importing some data from third party tool or database there will be some records which doesnot contain mandatory fields filled. so data-policy will check that whether mandatory field is filled or empty at the time of importing, if mandatory field is not coming into servicenow, then data policy will ignore that record.
Check the below links for more information
https://community.servicenow.com/community?id=community_question&sys_id=05cccfe5db9cdbc01dcaf3231f9619a4#:~:text=Here%20is%20the%20definition%20from,form%20through%20the%20standard%20browser.
https://developer.servicenow.com/dev.do#!/learn/courses/quebec/app_store_learnv2_scripting_quebec_scripting_in_servicenow/app_store_learnv2_scripting_quebec_data_policies/app_store_learnv2_scripting_quebec_data_policy_vs_ui_policy
https://community.servicenow.com/community?id=community_question&sys_id=7a358f6ddbd8dbc01dcaf3231f96195e
Thanks
Chandu Telu
Please Mark ✅ Correct/helpful, if applicable,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-07-2022 01:20 AM
Hi,
Follow Up - is your requirement is completed with my answer. Please mark answer as correct it will use for other community members if not let us know your issue so we can help you
Thanks
Chandu Telu
Please Mark ✅ Correct/helpful, if applicable,

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-06-2022 02:02 AM
Data Policies enforce data consistency by setting mandatory and read-only field attributes. Unlike UI Policies, Data Policies execute server-side. UI Policy logic only applies to data entered in a form. Data Policy logic executes regardless of how a record changes. Developers cannot apply scripts to Data Policies.
UI policies only do client level validation where the data is entered on the browser while Data policies ensure server-side data consistency. For example, UI policies won't work when you bring in the data through import sets or some other kind of integrations like rest api.
Please upvote and mark as correct if this answers your question