Wednesday, July 9, 2014

Microsoft Dynamics CRM 2013 : Business rules


A new functionnality of Microsoft Dynamics CRM 2013 is the business rules. They permit to replace a part of Javascript we had to use in Microsoft Dynamics CRM 2011.
In this post, I will describe all the options an Administrators have to customize their rules.

The business rules are editable in the System customization.

Possible actions with Business rules

  • Show error message : Show specific error message
  • Set field value: Choose a field for an update
  • Set business required : Permit to set a field to required
  • set visibility: Show or not a field
  • Lock or unlock field: Set a field with read only rule

Interface

To access to the business rules creation interface, go to Settings / Customization / System Customization, select the entity (Contact) and Business rules:
To add a businees rule for you entity, click on "New".

I created an example of a business rule here :
Condition :
  • If Mobile phone does not contain data : Each time the field is empty, an action will be activated.

Action:
  • Show the error message "..." against field Mobile Phone: If the field is empty, it's impossible to save the contact record and the message appears.
Once your business rule is finished, save and activate it !

Example :

You can see there that my field Mobile Phone is empty, the error message appears :

If i try to save my record with the empty field, the message appears again in the bar :


You can create business rules as many as you want, hope this post helps you !

No comments: