Business Rules are an excellent way for a system admin to apply form logic without custom code. Like the other tools in this blog series, adding business rules to your Dynamics 365 system will help aid in user adoption. Make the tech do some of the heavy lifting for your users! Great use cases for business rules include:
- Minimizing number of required fields at the first point of entry.
- Help users simply and easily take actions.
- Hide the noise – only show fields that meet specific conditions and hide the rest.
- Control access to fields by locking those that should not be editable after a condition has been met.
- Display custom error messages to help your users.
Business rules provide a simple drag-and-drop interface to implement commonly used business scenarios that used to require custom code. A business rule will run in real-time, so you will see the action as soon as a condition has been met (unlike a workflow that will run on form save).
You can apply a business rule on a Main Form or Quick Create Form. A business rule will work online, on premise (versions 2013, 2015, 2016 or Dynamics 365), on Microsoft Dynamics 365 for Tablets and in Dynamics 365 for Outlook (supported in both online and offline modes).
Available Actions
There are seven actions you can take by configuring a simple drag and drop business rule on a form:
- Recommendation: Add a recommendation to a field.
- Show Error Message: Display a custom error message.
- Set Field Value: Set a field value based on a conditional.
- Set Default Value: Set a default value based on conditions met.
- Set Visibility: Make a field visible or not visible based on conditions met.
- Set Business Required: Set a field required only if it meets defined conditions.
- Lock/Unlock: Lock or unlock a field only if it meets defined conditions.
Scope
Scope is important! When you configure a Business Rule, you have several options for setting scope:
- Entity: The Business Rule runs on the server side (meaning it gets queued up with workflows, plug-ins, etc). It runs on all forms.
- Specific Form: The Business Rule runs client side (meaning it runs when the user opens the form) only on the one identified entity form.
- All Forms: The Business Rule runs client side (meaning it runs when the user opens the form) on all forms for the entity.
Exceptions to Business Rules
Also, there are a few exceptions:
- Business Rules will not work on composite fields (like Full Name or the Address composite block).
- Business Rules will not work on multi-select option sets.
The 10 Tools
Here are the tools we will review in the entire series: