POWEROBJECTS

718 Washington Ave. N. Suite #101
Minneapolis, MN 55401
View map and all Locations

Send us a message

PowerObjects has numerous blogs and resources already published on various tips and tricks on this new release of Dynamics CRM. Today’s blog will focus on business rules, a new feature to Microsoft Dynamics CRM 2013 that provides a great way to achieve the most common and simple validations without coding skills.

crm-101

In many CRM implementations, users need to implement simple validations such as the ability to show/hide fields if something happens. In the past, a developer would write JavaScript code to implement these rules.

With business rules in CRM 2013, a system administrator or a power user can create validations or business rules without coding skills, taking on the role of a pseudo-developer. Although business rules in CRM 2013 won’t completely replace JavaScript, it’s a good alternative to build validations with a point-and-click user experience.

Here are a few of the most common validations and business rules that can be implemented in CRM 2013:

  • Make a field required when the value in another field is changed
  • Set the value of a field based on various criteria
  • Calculate the value in a field based on the value(s) of other field(s)
  • Show an error message when an invalid value is entered
  • Show/hide or enable/disable a field depending on the value entered in another field
  • Set “Business Required”

Let’s take an example and create a rule on the contact form to make a “Spouse/Partner Name” field required when the field “Marital Status” = Married.

  1. Navigate to Business Rules area in CRM 2013. To do this, go to Solutions, choose the desired entity, then select Business Rules. You can also get to it in the form editor by clicking Business Rules in the ribbon.
  2. Click New Business Rule.
  3. Set up the new rule as shown below and click Save.

  1. Click Activate to make it available to everybody.
  2. Navigate to the contact form and verify that when Marital Status does not equal Married, the Spouse/Partner Name field is unavailable.If the status says Married on the other hand, you’ll now see a field that allows you to enter the name of a spouse or partner.

Note a few facets to remember when working with business rules:

  • You can use business rules on CRM forms (Main and Quick Create) for both the web application and CRM for tablets
  • Business rules are applicable to out-of-the-box entities that are customizable as well as custom entities.
  • Similar to JavaScripts, they run client-side.
  • You “activate” the rule after creating it.
  • You can duplicate a rule using Save As and reuse it for other validations.
  • Business rules can be packaged in a solution.
  • If you have multiple forms, you can specify the rule to work on only one form or all forms.
  • They don’t replace the need for JavaScripts entirely.
  • They are limited to single entity, i.e., you can’t build validations for parent-child entities.
  • They have limited capability for conditional logic (if-else scenarios) with multiple branches.

If this blog was helpful, don’t forget to check out our other blogs and resources for Microsoft Dynamics CRM 2013.

Happy CRM’ing!

Avatar for JoeCRM

JoeCRM

Joe CRM is a CRM superhero who runs on pure Microsoft Dynamics CRM adrenaline. As the face of PowerObjects, Joe CRM’s mission is to reveal innovative ways to use Dynamics CRM and bring the application to more businesses and organizations around the world.