Set Field Visibility in Dynamics 365 Using a Business Rule

Visit Website View Our Posts

Business Rules in Dynamics 365, CRM 2013, CRM 2015 and CRM 2016 provide an interface for you to simply configure the ability to set field visibility. Let's walk through a brief example scenario so you can see just how easy it is for a System Administrator to use the drag and drop Business Rule canvas.

First, let's review the components of a business rule:

  • Scope: Define scope of this Business Rule. Select from Entity, All Forms or specific forms.
  • Condition: Define a new Condition. If X, then Y. If the condition is true, you will add actions to take. If the condition is false, you will add actions to take.
  • Actions: 7 possible actions you can use in the Business Rule canvas.
    • Recommendation
    • Lock/Unlock
    • Show Message Error
    • Set Field Value
    • Set Default Value
    • Set Business Required
    • Set Visibility

During a recent focus group with our CRM Super User Team, it was discovered that any time the Inside Sales Team is working on Qualifying a Residential Lead, they ignore several Company--specific fields on the Lead form that are not relevant. As a spectacular System Administrator, you know you can eliminate this pain point and increase user adoption for this user group by creating a simple Business Rule. Let's walk through the entire process:

  1. In a Solution file in your Sandbox, add a new Business Rule to the Leads Entity.
  2. At the top, enter a Business Rule Name and Description. Set Scope to Entity, since we want this rule to fire on all Leads, regardless of which form is used.
    field visibility
  3. Next, we will define our Conditional branch. Click the purple Condition box, then work in the Properties box on the left-hand side. Enter a Display Name, then create the Rules. For this example, we will select Field = Lead Type, Operator = Equals, Type = Value and Value = Residential. Click Apply at the bottom of the box.
    field visibility
  4. Now that we have defined our condition, we must add actions. Remember, the path along the top are the actions to take when the Condition is True. In this case, when Lead Type is Residential, the top path defines the actions taken. When the Conditional is False (in this example, when Lead Type = Commercial), the bottom path defines the actions taken. To add an Action, select the desired Action (Set Visibility for this example) click the box (circled below) and drag it onto the canvas in the appropriate path.
    field visibility
  5. When the Set Visibility action box is on the canvas, click the green box. Enter Display Name, select Field and change visibility from Yes to No where appropriate. Finally, click the blue Apply button at the bottom.
  6. Follow the same steps for the FALSE branch. Click the Components tab on the right-hand side to access Actions to drag and drop on the canvas.
  7. Repeat steps 4-6 until all fields have been included.
  8. Once complete, click the Activate button at the top.

Now that you have configured and activated your business rule, it's time to test! Go to a Lead, change Lead Type to Residential and verify that Company Name, Company Phone, Industry and SIC Code are not visible. Change Lead Type back to Commercial and verify that those fields are visible. Then, turn it over to your CRM Super User group to test and verify. Once everything is confirmed, it's time to schedule your deployment to production. Congratulations, you have configured a simple drag-and-drop Business Rule to set field visibility based on the Lead Type selected.


Beringer Technology Group, a leading Microsoft Gold Certified Partner specializing in Microsoft Dynamics 365 and CRM for Distribution. We also provide expert Managed IT ServicesBackup and Disaster RecoveryCloud Based Computing and Unified Communication Solutions.

Show Buttons
Hide Buttons