I am still Confuse about Business Rules, How they work, What is difference between Business Rule and UI Policy

sachingawas
Kilo Expert

I am still Confuse about Business Rules, How they work, What is difference between Business Rule and UI Policy

4 REPLIES 4

sunilsafare
Mega Guru

Hi Sachin,



Business Rule is an operation to perform on insert, update, query and delete of records from server side. You can refer below link for more information


Business Rules - ServiceNow Wiki



UI Policy is used to run operations from client side to make fields or other stuff on forms mandatory, read only, hide etc., Pls see below link for more info.


Creating a UI Policy - ServiceNow Wiki


Theoretically I know but I want example.


Anurag Tripathi
Mega Patron
Mega Patron
  • business rules are server side whereas ui policies are client side
  • UI policy works only on a "FORM" whereas BR runs on any db transaction.
  • Display BR runs before the form load, then client scripts run when the form is loading, and the the ui policies run when the form has loaded.
  • BR typically are like database triggers in many ways, UI policies are mainly sued for controlling the field behavior
-Anurag

Uncle Rob
Kilo Patron

Sachin,



Their relationship to the moment of SAVE is one of the big differences.  



UI Policies will help you control your form (visibility, mandatory, read/only properties of fields) before you even reach for the Save button on a record.



Business Rules evaluate when you click that save button (or anything that triggers a Create, Update, or Delete).   With it, you can run scripts based on the transaction data.