Business rules have been a great addition to the arsenal of features in Microsoft Dynamics 365. Business Rules allow us to set field requirements, set default values, hide/show fields, and several other functions that formerly required custom code to be developed.
As companies have used Business Rules in Dynamics 365 more and more, we occasionally are asked to troubleshoot situations where the business rule is no longer functioning as expected. While there are a variety of reasons issues arise, one of the most common reasons is also one of the simplest to resolve.
Two of the most frequent uses of Business Rules are to either set a field(s) as required/not required or set the field(s) as hidden/shown based on a set of conditions. Let’s use an example where the business rule locks or unlocks the Fax field based on whether two fields contain a value. Here is what that might look like:
Everything checks out and it works as expected, with the Fax field locked when both the Fax and Ticker Symbol fields contain a value and the Fax field is unlocked if they both don’t contain a value.
Then you hear from users that the Fax field is no longer being locked as it has been in the past. When you look at the Business Rule, it looks unchanged and the validation check reveals no errors. But the business rule no longer functions.
One of the first thing to check is if a field referenced in the business rule has been removed from the form. In our example, Ticker Symbol is being checked to see if it contains a value. Originally, this field was on the form. But when checking the form now, someone removed the Ticker Symbol field from the form (perhaps it was decided it was not needed). Because it is no longer on the form, the Business Rule will no longer function – Business Rules require the field on the form in order to function correctly.
In our example, the one field change was easy to spot and correct. But, if your Dynamics 365 Business Rule performs functions on a number of fields the culprit may be less obvious. And if any one of these fields is removed from the form, the entire Business Rule ceases to function. So – when a Business Rule stops working, one of the first things you may want to check is if changes were made to the form.
For more Dynamics 365 tips and tricks be sure to subscribe to our blog on the top right on this page and also visit our archive of Dynamics 365 blog posts.