Difference between UI Policy vs Data Policy ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-24-2025 08:14 PM
Day - 4 ServiceNow Interview Questions - 4
Difference between UI Policy vs Data Policy ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-26-2025 04:56 AM
One more difference is when we run transform map then data policy will run because data policy run at the time of insertion, updation of record. Ui policy not run at the time of transform map or creating new record.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-26-2025 05:12 AM
Both Data Policy and UI Policy enforce data integrity by controlling field attributes based on specific conditions. While Data Policy operates on the server-side, UI Policy functions on the client-side.
- Data Policy ensures data consistency by marking fields as mandatory or read-only and is applied regardless of how a record is updated.
- UI Policy affects data entered into a form but does not enforce rules outside the form context.
- Scripts cannot be used within Data Policies.
Creating a Data Policy
- Navigate to the Create Application File section.
- Select DATA POLICY as the file type.
- Configure the newly created data policy.
Key Characteristics of Data Policy
- Data Policies trigger based on specified conditions and execute corresponding actions when the conditions evaluate to true or false.
- Unlike UI Policies, they do not require scripting to set fields as mandatory or read-only.
- Data Policies apply to all data entered into the system, including data imported through import sets, web services, or integrations.
Converting Between Data Policy and UI Policy
It is possible to convert between Data Policy and UI Policy:
- In a UI Policy form, a UI Action button labeled "Convert this to Data Policy" allows automatic conversion. Clicking it generates a new Data Policy and redirects to the newly created record.
- To convert a Data Policy into a UI Policy, navigate to:
System Policy --> Rules --> Data Policies
Open an existing Data Policy, locate the "Convert this to UI Policy" option under Related Links, and click it. A new UI Policy record will be created, which can then be modified as needed.
Key Characteristics of UI Policy
- Client-side rules that control form behavior and field attributes.
- UI Policies can make form fields mandatory, visible, or read-only without requiring scripting.
- These policies apply only to data entered directly into a form via a browser.