DYNAMICS 365 BUSINESS RULES LIMITATION WITH MULTISELECT OPTION SET FIELD

Since the introduction of the Business Rules as a new functionality in Dynamics 365, it becomes the recommended way to be leveraged against writing client-side code whenever it is possible.

By using this approach, it will become more maintainable and supportable for further upgrades of the environment and will reduce time spent on code management and compatibility before/after the updates.

However, there are situations where you cannot fully apply your needs in a Business Rules due to the complexity of the need or limitation in the Business Rules. Therefore, you have to get back again to JavaScript.

In this post, I will talk about one of those limitations in Business Rules which is related to Multiselect option set fields.

Unfortunately, when you have a multiselect option set field, you cannot use it as part of the Business Rule condition or within the available actions, even if you want to achieve a simple task like showing or hiding it, you will not find it within the fields list.

multiselect option and business rules

multiselect option and business rules 2

Luckily, you can overcome this situation by adding a JavaScript function in order to achieve what is needed against the multiselect option set field.

For example, if you want to show the field, you can do it as you normally do with any other field by adding the following line of code on the specific event you want to execute formContext.getControl("cak_paymentmethodecode").setVisible(true);

In order to have a look on the different elements and possibilities of the business rules, you can check this docs link.

Finally, if you find that this feature should exist in the business rules, you can vote on the idea in this link.


Hope This Helps!

Comments

Popular posts from this blog

DYNAMICS 365 HOW TO HIDE RECENT RECORDS FOR LOOKUP FIELD IN UCI

SEARCH BY GUID IN DYNAMICS 365

SAVE FORM IN DYNAMICS 365 JAVASCRIPT