Quantcast
Channel: Summit Group Software - Microsoft Dynamics CRM 2015
Viewing all articles
Browse latest Browse all 5

No Code Needed! Apply Business Logic through Business Rules

$
0
0
Author: 
Heidi Kadoun

Business Rules provide a quick and simple way to apply business logic to entities or fields without having to know about or write code. Some things a business rule can do is set/clear field values, set field requirements, show/hide fields, enable/disable fields, and validate data. One thing a business rule can NOT do though, is work between two different entities.

For those of you familiar with Microsoft Dynamics CRM, workflows have originally provided these functions in the past. However, they could get very confusing and quite lengthy for even the simplest tasks.

This blog will go over how to create a simple business rule to show/hide a secondary address field based upon another check box field. Note that you must have Administrator or Customizer security privileges to access the required components to perform this task.

First, navigate to the Customizations page. Click the Entity Option Bars> Settings> Customizations> Customize the System.

Once there, drill down into the entity in which you will be applying the rule and select the main form. Expand Entities> Expand Account> Select Forms> Open the Main Account form.

The goal of using this business rule is to simplify our Account form so we only display the secondary address when there is one, instead of showing the fields all of the time.

Let’s create a new field to house the question in which our business rule with be based off, by clicking New Field and filling out the required information. Be sure to create a TWO OPTION field.

Find your newly customized field in the Field Explorer and drag-and-drop it on the form. Once it’s on the form, double-click the new field and adjust the properties to show a check box. On the Formatting tab under Control Formatting, select Check box and click OK. Save and Publish your form.

Now, we’ll finally start creating the business rule. Click the Business Rules button in the command bar and click New Business Rule.

From the Business Rule window, we need to add an action, condition, and else condition. What we need is to hide the Address 2 field is the value equals ‘No’ and show the field is the value equals ‘Yes’.

When you’re done, Save your business rule and then Activate it. Business Rules are not applied and do not work until they are activated. Below, is what your final Business Rule should look like after activation.

After the business rule has been activated, Save and Publish your form again to see the changes in CRM.

    

If you wanted to take it a step further, you could always create another business rule that automatically checks the Secondary Address box if there is any information in the Address 2 field. See below for what that formula might look like. 

 

Images: 

Viewing all articles
Browse latest Browse all 5

Latest Images

Trending Articles





Latest Images