Search code examples
javascriptdynamics-crmmicrosoft-dynamicsdynamics-365

Hide multi select option set field in Dyanmics 365


I have a multiselect option set field in dynamcis 365 and I want to hide it based on the value of another field....my problem is that setVisible function is not available for this type of field.

Is there any way I could handle it with javascript? What should I do?


Solution

  • setVisible() is available for both single and multi-select option set controls.

    Ensure you are calling setVisible() on the multi-select control, not the attribute:

    if (valueOfOtherFieldIsX) {
      formContex.getControl("prefix_multiSelectLogicalName").setVisible(false);
    }