That’s a very good question! I have had several scenarios where I wanted to hide and show a multi-select option field dynamically, or set it business required or not. However, Multi-select option fields do not show up in the Business Rule designer, so you can’t create business rules on them.
I have not been able to find any Microsoft documentation as to why that is, but there are plenty of posts that state that Multi-Select option fields are in fact not supported in Business Rules. As far as I have read, they cannot be used in Workflows either, but I haven’t tested that claim.
So all I can say is: “I’m sorry Dave! I’m afraid you can’t do that”.
Best Workaround proposal:
Best way to manipulate the field – since Business Rules are out – is to simply create a piece of javascript and call it on form load as well as when the field upon which e.g. the multiselect field visibility is based is changed. Something like:
setMultiSelectionFieldVisibility: function () {
var myfieldAttr = Xrm.Page.getAttribute("crm_mymultiselectionfield");
var myfieldCtrl = Xrm.Page.getControl("crm_mymultiselectionfield");
if (!ClientUtility.DataUtil.isNullOrUndefined(myfieldAttr) &&
!ClientUtility.DataUtil.isNullOrUndefined(myfieldCtrl)) {
//Assume not visible:
myfieldCtrl.setVisible(false);
myfieldAttr.setRequiredLevel("none");
var dependentField = Xrm.Page.getAttribute("crm_fieldsshouldbevisible");
if (!ClientUtility.DataUtil.isNullOrUndefined(dependentField)) {
var shouldBeVisible = dependentField.getValue();
if (shouldBeVisible) {
myfieldCtrl.setVisible(true);
myfieldAttr.setRequiredLevel("required");
}
}
}
}
It is neither a clean, nor a desired way of solving this – especially if there are other fields for which a Business Rule has been created. In that case, the field logic is split in two very different places. Unfortunately, there is nothing to do about it unless Microsoft decides to fix the problem.