difference between ui policy, data policy and script include?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-05-2016 10:12 PM
hi all,
I'm little bit confuse about the difference between ui policy, data policy and script include?
can any one help me?
Thanks,
Rajashekhar Mushke
Rising star : 2022 - 2024
Community Leader -2018
Connect me on LinkedIn : Rajashekhar Mushke

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-05-2016 11:20 PM
UI policy - Client sided script. Follows the order field for execution. It is used to basically make fields readonly, visible, mandatory on the client side.
Data policy - Server side script. It is used to makes the field readonly, mandatory etc on server side. The data policy should be met if any operation needs to be performed like update or insert of a record.
Script include - Reusable script repository. It can be called on client side using glideajax and server side using object instantiation .
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-06-2016 12:16 AM
Hi Rajesh,
Already everyone has well explained that but just to add for UI policy and data policy diff :UI policy just runs on the form, data policy runs on everything, form, web services etc.
Also, you may find the below link helpful.
Differences Among Scripts - ServiceNow Wiki
Mark Correct if it solved your issue or hit Like and Helpful if you find my response worthy.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-30-2019 10:33 AM
- Data policies are similar to UI policies, but UI policies only apply to data entered on a form through the standard browser.
- Data policies can apply rules to all data entered into the system, including data brought in through import sets or web services and data entered through the mobile UI.
- Data Policies, unlike UI Policies, execute on the server.
- You cannot make a field visible or hidden using data policies, because there is no server-side equivalent of a contextually hidden field.
- There is also no Advanced view, no scripted conditions, and no UI or server-side scripting possible through a data policy (except to the extent that scripting is possible inside of any condition builder to make a determination about whether the data policy should run).