Dynamics 365 Education and Knowledge

Dynamics 365 Education and Knowledge

https://charlesabikhirs.blogspot.com

SET DYNAMICS 365 MULTISELECT OPTIONSET FIELD IN C#

Published

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!

Continue to website...

More from Dynamics 365 Education and Knowledge