Things to Look out for when using Business Rules in Dynamics 365

Satyvir Jasra, 14 August 2018

Business rule in Dynamics 365 allows us to create simple rules and recommendations to apply logic on the form without the use of JavaScript. However, it can sometimes cause issues for JavaScript logic. For example, based on the requirements, I had to hide the Company Profile section on the Account form if the value of the Account Category was Standard. To achieve this, I used the JavaScript logic to hide the section. However, I used business rule to show/hide the Industry field in Header form which was also available in the Company Profile section.


JavaScript logic to show/hide the section was working fine until the business rule was added to show/hide the field in the form header. When the business rule was added, the JavaScript logic no longer was hiding the Company Profile section. However, the business rule was able to show/hide the Industry field in the header and the form. When the business rule was deactivated the JavaScript, logic worked fine.

The workaround this issue is to turn business rule logic into JavaScript logic and deactivating the business rule itself. When the business rule logic shows/hides a field which is also available in the section, the section is visible again regardless of what JavaScript did to its visibility. This happened in Dynamics 365 instance using the version