By Dave Packard – Cargas CRM Consultant

Of all the new features in CRM 2013 the one that is quickly becoming my favorite is the Business Rule functionality. When I first started trying a few Business Rules I could see how they could be useful but they seemed rather limited. But the more I work with them the more uses I am finding for them—so many in fact that in a recent 2011 to 2013 upgrade I was able to move over 40% of the javascript on the Account form to Business Rules.

These rules can replace many of the most common javascript code. For example, if you want to lock the Account Number field if it has a value, you can now do that with a simple business rule. Looking to show a field if the Case Priority is High? There is a Business Rule for that. Need a basic formula to add two fields together? That’s right, you can create a Business Rule for that.

So why should you replace javascript with a Business Rule? There are two main reasons:

  1. Updates and Upgrades. Business Rules are now a standard feature for CRM online and as such they are full supported by Microsoft, which includes all upgrades (remember these are twice a year now) and for new releases. As we saw with the 2011 Polaris update and the 2013 upgrade, javascript that had worked in older versions may not be cross browser compatible or even work in a new version. But a business rule will transition with little or no difficulty since it is part of the CRM SDK.
  2. Mobile. Business Rules work with the tablet app for Microsoft Dynamics CRM 2013. True, javascipt written for CRM 2013 will work as well but Business Rules are native functionality and will be supported online, via Outlook and also via mobile. Custom code may need to be modified as CRM Online, and its mobile component, continues to evolve.

As with all things the Business Rules do have limitations. There are no “or” statements in the conditions, so if you want a rule to set a field to True if the Case Priority is High, you will need a second rule to set that field to False if the Case Priority is not High. And there are only so many actionss the rules can do, which are:

  • Show error message
  • Set field value
  • Set business required
  • Set visibility
  • Lock or unlock field

I expect more actions to be added to this list in future updates but until then, these can cover a wide range of customizations—far more than I originally thought. So before you write that custom javascript take a look and see if a Business Rule will cover your needs.