Blog
Microsoft Dynamics 365 Business Rules
Microsoft Dynamics 365 Business Rule Tips
Using Microsoft Dynamics 365 business rules to show and hide fields is one of the most useful features of Microsoft Dynamics 365. Business rules require no knowledge of code and democratize functionality that was once only available to developers. We’re big fans of using Business Rules to show and hide fields at Beringer Technology Group. We have written about them extensively, including this great article by my colleague, Set Field Visibility in Dynamics 365 Using a Business Rule. That article serves as my starting point for the three Dynamics business rule tips that follow here (so head on over and read it if you haven’t already). My intention is to show you how to take this business rule functionality to the next level and help you look like a Dynamics 365 business rule rock star.
Microsoft Dynamics 365 Business Rule Tip #1 – Hide Fields by Default
If you’ve used business rules to show and hide fields, have you noticed that the hidden field flickers when the form loads? This is because Dynamics shows the field by default, and the business rule quickly hides it when the form loads. Fix this by un-checking the Visible by default box on the Display tab of the Field Properties:
This hides the field until the business rule’s criteria is met and the field is shown, removing the step where the business rule hides the field at the beginning.
Microsoft Dynamics 365 Business Rule Tip #2 – Complete the Business Rule
The logic above is great for a clean UI look and user experience, but it doesn’t remove the need to complete both sides of your business rule. If your condition is met, and the True branch of your business rule shows the field, don’t neglect to complete the False branch.
The business rule will not automatically re-hide your field without the False branch completed. This can result in a situation where the condition is not met but the field is shown anyway.
Microsoft Dynamics 365 Business Rule Tip #3 – Set Non-Event Dependencies
The last thing you should do before congratulating yourself on a great business rule implementation is set non-event dependencies. This prevents the fields from being removed, which breaks the business rule with no warnings or alerts. This is especially important when working with a group of Dynamics configurators, but also prevents you from breaking functionality if you just plain forget a field is part of a business rule (as I have a habit of doing).
To accomplish this, navigate to Form properties.
Then, add the fields used in your business rule as ‘Dependent fields’ on the ‘Non-Event Dependencies’ tab.
The field now displays on the form with the red “Locked” icon, and the “Locking” section on the Field Properties box reminds you that the Field is locked as a requirement for script. This prevents you from arbitrarily removing the field and breaking your business rule unintentionally.
Contact Us!
If you’re struggling with how to implement business rules or need help using workflows or custom code to make Dynamics 365 work for your business, contact us today at 800.796.4854. We can help you with all of your Dynamics 365 needs.
Beringer Technology Group is 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.