Tags
Business rules provide the capability to:
- Perform data validation
- Display Error messages
- Display/Hide fields
- Enable/Disable fields
The above can be achieved by writing less complex code and rules can be implemented with aid of Business Rules designer.
In the example below we will implement Business Rules on Event entity to check if Start Date is greater than End Date and if true then display a error message.
Clicking on New brings up the rules designer window. Every Business Rule always starts with a condition and this is reflected when the rules designer window dialogue is displayed
In the Properties tab enter a Display name for Condition and apply the required rule by selecting the drop down list values
As shown above we are implementing the check condition Start Date > End Date click on Apply
If the check condition is true then display a error message. These will be under Components tab drag and drop Show Error Message component next to the Condition
Validate the business rule by clicking on the Validate button. Other attributes that can be modified include rule name and description. Once saved activate the business rule to come into effect.