Contact Us Today!

Set Field Visibility in Dynamics 365 Using a Business Rule

Set Field Visibility in Dynamics 365 Using a Business Rule

Business Rules in Dynamics 365, CRM 2013, CRM 2015 and CRM 2016 provide an interface for you to simply configure the ability to set or hide 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.
    business rule
  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.
    Business Rule
  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.
    Business Rule
  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.
    Business Rule
  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.
    Business Rule
  7. Repeat steps 4-6 until all fields have been included.
  8. Once complete, click the Activate button at the top.
    Business Rule

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 and hide visibility based on the Lead Type selected.

Contact Us

If you have questions and need assistance with Business Rules at your organization, please do not hesitate to contact us at 800.796.4854. We can help you with all of your Dynamics 365 needs. Beringer Technology Group is a Microsoft Gold Certified Partner and has proven excellence in Managed IT Services.

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



Rob is the CTO of Beringer Technology Group, and focuses his efforts on software development, cloud engineering, team mentoring and strategic technical direction. Rob has worked with Beringer since 2005, and has influenced every department from Development, Security, Implementation, Support and Sales. Rob graduated with his MBA from Rowan University in 2012, earned his Bachelors of Computer Science in 1997, and is current with several Microsoft technical certifications. Rob is very active, and loves to mountain bike, weight train, cook and hike with his dog pack.