what is the difference data policy and UI policy

Bhavana Ramesh1
Tera Contributor

Hello,

What is the difference between data policy and ui policy?

regards,

Bhavna

1 ACCEPTED SOLUTION

AbhishekGardade
Giga Sage

Hello Bhavana,

Here are my observations about Data and UI Policy:

#Data Policy:

  1. Data policy is "server side"
  2. Data policies can apply rules to all data entered into the system.
  3. Data Policy Rules : mandatory and Read Only
  4. Converting Data Policy to UI Policy deactivates the data policy
  5. Alternatively you can use Use as UI Policy on client
  6. Apply to import sets - If selected, the data policy applies to data brought into the system from import sets. This option also applies to web service import sets.
  7. Apply to SOAP: If selected, the data policy applies to data brought into the system from a SOAP web service. Scripted SOAP web services are not affected. This field does not affect data policy interaction with REST web services.
  8. No option to run on onChange / onLoad

#UI POLICY: Governs form and form field behavior, client side

  1. UI Policy Actions: Read Only, Mandatory, Visible, Clear the field value
  2. UI Policy Related List Actions : hiding related list on form
  3. Run Scripts: UI Policies do not always require scripting.
  4. Global: If Global is selected the script applies to all views for the table. If the Global field is not selected you must specify the view
  5. Reverse if false: Take the opposite action when the Condition field evaluates to false. Execute if false script to run
  6. Order : The order of evaluation is from the lowest number to the highest number
  7. UI Policies execute after Client Scripts.
  8. Converting a UI policy to a data policy deactivates the UI policy. To retain the policy in the UI, ensure that the Use as UI Policy on client check box is selected on the data policy record.

Criteria

Client Script

UI Policy

Execute on form load

Yes

Yes

Execute on form save/submit/update

Yes

No

Execute on form field value change

Yes

Yes

Have access to field's old value

Yes

No

On Change on Multiple Field

No

Yes

Execute after Client Scripts

No

Yes

Set field attributes with no scripting

No

Yes

Require control over order of execution

*Yes

Yes

Apart from this, Mark gave you the links so you refer.

Please mark as Correct Answer/Helpful, if applicable.
Thanks!
Abhishek Gardade

Thank you,
Abhishek Gardade

View solution in original post

7 REPLIES 7

Swapnil Shirsik
Giga Guru

Data policy run on server side- can make data consistent irrespective of the way it entered system.

UI policy run on client side-deals with data entered through form only.

AbhishekGardade
Giga Sage

Hello Bhavana,

Here are my observations about Data and UI Policy:

#Data Policy:

  1. Data policy is "server side"
  2. Data policies can apply rules to all data entered into the system.
  3. Data Policy Rules : mandatory and Read Only
  4. Converting Data Policy to UI Policy deactivates the data policy
  5. Alternatively you can use Use as UI Policy on client
  6. Apply to import sets - If selected, the data policy applies to data brought into the system from import sets. This option also applies to web service import sets.
  7. Apply to SOAP: If selected, the data policy applies to data brought into the system from a SOAP web service. Scripted SOAP web services are not affected. This field does not affect data policy interaction with REST web services.
  8. No option to run on onChange / onLoad

#UI POLICY: Governs form and form field behavior, client side

  1. UI Policy Actions: Read Only, Mandatory, Visible, Clear the field value
  2. UI Policy Related List Actions : hiding related list on form
  3. Run Scripts: UI Policies do not always require scripting.
  4. Global: If Global is selected the script applies to all views for the table. If the Global field is not selected you must specify the view
  5. Reverse if false: Take the opposite action when the Condition field evaluates to false. Execute if false script to run
  6. Order : The order of evaluation is from the lowest number to the highest number
  7. UI Policies execute after Client Scripts.
  8. Converting a UI policy to a data policy deactivates the UI policy. To retain the policy in the UI, ensure that the Use as UI Policy on client check box is selected on the data policy record.

Criteria

Client Script

UI Policy

Execute on form load

Yes

Yes

Execute on form save/submit/update

Yes

No

Execute on form field value change

Yes

Yes

Have access to field's old value

Yes

No

On Change on Multiple Field

No

Yes

Execute after Client Scripts

No

Yes

Set field attributes with no scripting

No

Yes

Require control over order of execution

*Yes

Yes

Apart from this, Mark gave you the links so you refer.

Please mark as Correct Answer/Helpful, if applicable.
Thanks!
Abhishek Gardade

Thank you,
Abhishek Gardade

Prasad Dhumal
Mega Sage
Mega Sage

UI Policy is used to make field mandatory, read only and visible or not where
Data Policy is used to make field Mandatory and Read Only.

UI Policy runs on a form where
Data Policy run on server side.

We can write script in UI Policy where
We cannot write script in Data Policy

UI Policy is applied on a form of the table where
Data Policy can be aplied on a data which is entered in system through import set, mobile UI, web services etc.