Posted by Sanford Mosby | February 18, 2015
As the local “Tech Guy”, I was quite excited to hear of this enhancement from Microsoft for Dynamics CRM 2015 Business Rules.
It is the addition of conditional branching in the business rules logic.
Previously, to have alternate conditions in business rules, we would need to create multiple business rules to satisfy each condition. For example, if we’re checking the value of Boolean attribute, rule 1 would check true, and rule two would check for false or not true. While creating these rules we have to be mindful of the activation order since the rules are executing in order of activation.
In Microsoft Dynamics CRM 2015, business rules now have the ability to use the if/then/else condition logic. This will provide cleaner business rules and afford the ability to have a fewer number of business rules activated.
As shown, the else condition is entered after the initial condition.
Not only can you add an else condition, you can add an “Else If” condition, which means you can continue the else conditions.
The “Set Default Value” action is a way fields can be populated on create of the record, or the opening of a New form for the record. For example, the “Set Default Value” could set the transaction currency on records when created. This will preclude the need of jscript to default the value when records are not created from parent records. The “Set default value” action only fires on a new record.
The other enhancement to business rules is the scope of execution. Previously business rules were created and run against the record’s form(s) as specified in the scope option.
In CRM 2015, the scope can be set to all forms, a specific form and the new option “Entity”. Setting the scope to Entity will force the business rule to run on the server when the record is saved. This gives the business rule functionality similar to a plug-in or workflow. It runs in the background. The advantage is the same as if a workflow is initiated or another event causes the record to be updated. This option is available in online instances as well as on premise.
Unfortunately the enhancements to the Business rules still do not give us the ability to manipulate tabs and sections. Code is still needed to adjust, section, tabs, and iframes.
Give us a call to discuss business rules further and how you can use this feature with your business logic.
By Sanford Mosby, Microsoft Dynamics CRM Technical Consultant with xRM3 a Microsoft Dynamics CRM Partner Serving the Customer Relationship Management needs of Southern California, St. Louis and anyone who asks.