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,
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.
Beringer Technology Group is a leading Microsoft Gold Certified Partner specializing in