Business Rules were introduced as an out-of-the-box MS Dynamics CRM 2013 feature and provide CRM administrators with the ability to implement custom form logic via a simple to use designer UI. The designer UI enables non-technical individuals to implement interface driven business logic without the need for JavaScript. The end result is delivered faster and with less expense than custom script development.
Business Rules monitor the behaviour of fields on a form and define one or more actions to be performed when the conditions are met. The following are conditions that can be evaluated:
  • Check a fields value against a static value
  • Check a fields value against the value of another field on the same form
  • String multiple conditions together separated by AND in one clause
The following defines the actions that can be performed when certain conditions are met on the form:
  • Show error message
  • Set field value
  • Set field required or not
  • Set field visibility
  • Lock or unlock a field
Business rules are created for an entity:
The condition and action are defined:
When the business rule is triggered the following error message is displayed:
Improvements have been made to Business Rules in MS Dynamics CRM 2015 and include:
  • Rules to set default values for a field
  • Support for if/else in their condition statements
  • Support for and/or conditional rules
  • Server side logic execution
Even with the improvements Business Rules cannot always satisfy complex business logic and administrators need to be able to identify when custom JavaScript development may be required. The following are some of the limitations of Business Rules:
  • Only fields associated with the local entity can be used in business rules. It will not be able to reference any data in related entities, for example in lookup fields.
  • A business rule is always enforced. There is no control over when it executes, for example only when the form loads or saves.
  • When a business rules changes the value of a property the onChange event for that property will not execute.
At the end of the day even with its limitation Business Rules are a powerful feature which enables the quick and cost effective implementation of custom form logic. And with future releases of MS Dynamics CRM we can only expect further improvements.