SET DYNAMICS 365 MULTISELECT OPTIONSET FIELD IN C#

As known, Multi-Select Option set field helps you select more than one option.

Sometimes, you want to dynamically select one or more option in the multiselect field.

In another post, we saw how to set a value of a multiselect option set field in JavaScript

In this post, we will see how to set options of a multiselect option set field in C#

  1. The below code snippet can be used to add the needed options you want to set for the multi select option set field
    OptionSetValueCollection osvc = new OptionSetValueCollection();
    osvc.Add(new OptionSetValue(<integerValueOptionSet>));

  2. Once the needed options are added to the OptionSetValueCollection, you can add it to the list of attributes of the entity record

Hope This Helps!

Comments

Popular posts from this blog

DYNAMICS 365 FILTER LOOKUP FIELD BASED ON N:N RELATIONSHIP

DYNAMICS 365 LEVEL UP BROWSER EXTENSION - PART 1 - FORMS

DYNAMICS 365 REFERENCE PANEL