Convert Data policy to UI policy and Vice versa
I have faced a conflict in my project where I have added a Data policy validation on certain fields on the form in draft state to make it mandatory .
I wanted this field to be filled by the requestor only and when I was working on integration which was creating a record in the system but not populating this fields , so On record creation it was giving a Data policy. exception.
As a solution of this I wanted to change this validation to be applicable only on the browser form and not on the record insertion happens.
So as a solution I need a UI policy instead of Data policy.
- Instead of creating a new UI policy and Deactivate the existing Data policy manually , we have an automated way to do the same which is related link on Data policy "Convert this to UI Policy" and if the reverse condition "".
- Role Required : admin
- Converting to UI policy from data policy automatically deactivate the source data policy.
- Procedure :
- * Navigate to and click an existing data policy.
- Under Related Links, click Convert this to UI Policy.
A new UI policy record appears. - Edit the fields on the UI policy record as necessary.
- Under Related Links, click Convert this to UI Policy.
- You can follow the same for converting the UI policy to Data policy
- Just we have to check couple of things to get things converted from UI policy to Data policy as Data policy lacks some of the features.
- Checklist :
- The Run scripts check box must be cleared.
- The Global check box must be selected.
- None of the UI policy actions can have Visible set to True or set to False. Visible must be set to Leave Alone.
- The Run scripts check box must be cleared.
- Procedure :
- Navigate to .
- Open an existing UI policy.
- Under Related Links, click Convert this to Data Policy.
A new data policy record is created. - Edit the fields on the data policy record as necessary.
- Navigate to .
Please be sure to bookmark this article as well as mark it as Helpful if you thought it was helpful.
Regards,
Amit Gujarathi
https://www.servicenow.com/community/developer-articles/convert-data-policy-to-ui-policy-and-vice-versa/ta-p/2367689
