Tuesday, November 05, 2013

Dynamics CRM 2013 - Business Rules Limitations

Business rules were introduced in Dynamics 2013 to make it easier to write logic to control the appearance and values of fields on an entity form.  Using business rules prevents you having to write JavaScript for simple UI logic such as setting the value of a field based on the contents of another field.  

In the example below the annual revenue of the account, the condition, determines if the account category field value is set to preferred customer, the action. 


There are a number of limitations to business rules including

  • There is no support for RegEx expressions
  • No support for OR conditions.
  • You cannot  hide a section, sub grid, etc only fields
  • Does not work on mobile forms only web and tablet.

Also for each typical rule you will probably need a reversing rule. So in my example if the revenue is over 50,000 then the account is changed to a preferred customer however I also needed to add a rule whereby if the revenue was changed to below 50,000 it was reset. As you can imagine you could end up with a whole series of business rule to set and unset fields and values.




Business Rules are also known as PBL, Portable Business Logic, and it looks like the long term intention is to extend the functionality and also to allow rules to be deployed server side as well as client side. In the meantime JavaScript skills will still be required!

No comments:

Post a Comment