CRM 2013 New Features: Business Rules

One of the new toys we get with CRM 2013 is the first release of Microsoft’s Business Rules engine.   Think of this release as a configuration-based replacement for basic field manipulation javascript.  

You get a simple UI where you can define Business Rules that will be executed by the CRM form’s OnLoad and OnChange events.  The rules are defined within each entity inside your solution file:


Each rule is comprised of Conditions and Actions (and there is a space to include some comments).  Here’s an example:


The Conditions are similar to what you will be used to with CRM’s workflow designer but Microsoft have taken a different approach to the configuration experience. When evaluating fields in your conditions you can check for nulls / not nulls and you can compare the entered value with a hard coded value, a calculated value or with another field:


The actions available are primarily related to fields:


You can also write Business Rules that perform validations, block record updates and display errors the user.  Here I tell the user off once they enter an Est. Revenue value:


This surfaces in the UI as follows:


Other things to know:

  • The rules need to be activated before they take effect (similar to workflows)
  • You can specify whether the rule applies to all forms or specific forms
  • The rules fire in the new mobile client for iPad and Windows 8
  • The rules are client-side rules, they do not fire during API calls, data import, etc.    Microsoft’s vision is to add that support in a future release.
  • The rules do not support show/hide of Tabs and Sections.  You either need to mention each field individually in your Business Rule or use javascript.
  • If your rule hides a field then CRM moves fields up to close the gap
  • You need to consider the inverse of your rule.  i.e. in my example I tell CRM what to do when the Est. Revenue field contains data.  I don’t tell it what to do when the Est. Revenue does not contain data.  I need to write a second Business Rule for that.
  • JavaScript runs before Business Rules
  • String comparisons are case sensitive


Fun feature, I like it!

3 thoughts on “CRM 2013 New Features: Business Rules

  1. John Clifton

    Good info, Gareth.

    I probably missed it but when I was looking at the 2013 VM, it didn’t seem to allow one to clear out the value of a field as an action. Can it do that?

    Many thanks,

    John Clifton
    Software Project Manager
    Collins Computing Inc.
    Microsoft Gold Business Solutions Partner
    Main (949) 457-0500 x221

    1. Gareth Tucker Post author

      Nice spotting, I don’t see a way to set a field to null, other than you can set a field to have the same value as another field so you could achieve the desired result that way (if you had a spare field with a null value lying around)

  2. Amlan Goswami

    I have a Business Rule in CRM which hides\shows some fields (not sections and tabs) based on another field. When I am using the CRM 2013 Mobile App , the Business Rules dont seem to be working.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s