Lessons Learned Using Business Rules in CRM 2013

Visit Website View Our Posts

By now, you are probably familiar with Business Rules in CRM 2013. If not, check out this post for a nice introduction. Using Business Rules is a great way for CRM administrators to customize Form logic without having to know any JavaScript. They are extremely useful in many situations, but administrators should also know when to use a Business Rule and when to reach for another tool instead.

There are tons of conditions that I can evaluate using a Business Rule before performing certain actions. I can evaluate a field’s value (or multiple fields’ values) and I can evaluate calculated conditions like whether or Field A is greater than the sum of Field B and Field C. I could even multiply a field’s value by a static number as a part of a condition, like shown. Pretty nice feature.

clip_image002

But what if my static number contains a decimal? What if I wanted to multiply my Sales by 1.75 as a part of the condition? For this scenario, a Business Rule would not be the best option because the Value field in the rule can only be a whole number. If you try to put a decimal value in the condition, CRM will change it to a whole number. You would need to use JavaScript to meet this requirement.

There are also several actions that I can perform when certain conditions are met on the Form. I can show an error message, set a value, mark a field as required, hide or show a field, and lock or unlock a field.

clip_image003

But what if I wanted to take an action like hiding a Tab or a Section? A Business Rule is not the ideal option. For this requirement, you would want to use JavaScript.

What about a Name field that you want to set a concatenated value like “ABC Company | Tier 1 | Customer” using 3 different fields strung together? At a glance, you can use a Business Rule to set a field’s value, but you cannot perform the concatenation. For this scenario, you may consider using a real-time workflow.

I have also noticed Business Rules cannot be told to only run OnLoad for example. For any logic that needs to be decidedly OnChange or OnLoad, JavaScript is your best bet.

As a best practice, keep in mind the performance impact of multiple Business Rules and potentially conflicting Business Rules. Just like a lot of JavaScript, too many Business Rules can negatively impact your form’s performance. Consider using this keyboard shortcut in Internet Explorer to assess the performance metrics for a particular form.

Business Rules are still great for a lot of scenarios. Consider these examples of very common requests which can (and probably should) be handled with Business Rules:

When Field A = Yes, Show Field B.

clip_image002[1]

When Field A contains data, make Field B and Field C required.

clip_image004

When Field A is greater than X, lock down Field B.

clip_image006

 

by Customer Effective

Show Buttons
Hide Buttons