By now, you are probably familiar with Business Rules in CRM 2013. If not, check out
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.
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.
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
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
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.
When Field A contains data, make Field B and Field C required.
When Field A is greater than X, lock down Field B.
by Customer Effective