How to: make a form-scoped business rule application-specific

By | January 31, 2022

In Microsoft Dataverse, business rules are not application-specific. They can be scoped to a certain main form, they can be scoped to a table, or they can be scoped to all forms in that table (in the latter case, this would mean the rules would also apply to all quick create forms).

Model-Driven applications will mix and match table components, including form components, as they need. However, business rules are not considered to be application components, so they will kick in for the forms / tables depending on the business rule’s scope and irrespective of the model-driven application.

Is there a way to make business rules application-specific? Of course it’s possible to only scope business rules to a specific main form, but what if we wanted it to work for all forms utilized in the application (including quick create forms), and, yet, what if we wanted it not to work for all other forms?

It’s easy to do.

Since business rule are not going to kick in on the form if there is a column referenced in that rule which has not been added to the form, we can just create a column in the table, add it to the application-specific form, and reference it in the rule. For example, it could be a text column, and we could use it in the business rule condition like this:

image

Then, if that column were on the form, the rule would kick in. Otherwise, it would not. So, all that’s left to do is add that column to the application-specific forms.

Leave a Reply

Your email address will not be published. Required fields are marked *