Amit Gujarathi
Giga Sage
Giga Sage

Symptoms

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.

 

Diagnosis

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.

 

Solution

  • 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 :
  • Data Policy to UI Policy 

    • Navigate to All > System Policy > Rules > Data Policies 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. 
    • AmitGujarathi_1-1667227295134.png

       

 

  • UI policy to Data 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.
  • Procedure :
    • Navigate to All > System UI > UI Policies.
    • 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.
    • AmitGujarathi_0-1667227198046.png

       

 

Please be sure to bookmark this article as well as mark it as Helpful if you thought it was helpful.

 

Regards,

Amit Gujarathi

Technomonk Youtube 

Amit Gujarathi Linkedin 

TheTechnomonk.com 

ServiceNow Community Amit Gujarathi 

GitHub

 

Version history
Last update:
‎10-29-2023 10:51 PM
Updated by:
Contributors