Benefits:
Multi-select Option Sets are simple to configure. If you want to create multi options set you just need to select multi-option data type They can be configured as a Local Option Set or point to a Global Option Set.
- values are displayed on the form separated by colons (;).
- Developers can interact with Multi-select Option Sets via Plugins and JavaScript.
Limitation:
First limitation is, Multi-select Option Sets cannot be used in Business Rules. However, developers can write some Business Rule functionality through JavaScript.
Workflows are not able to use Multi-select Option Sets as conditions or part of the create/update process logic step. we can only use Multi-select Option Sets as entry criteria to trigger a workflow.
- We can’t add a Multi-select Option Set to a Business Process Flow.
- we can not update a Multi-select Option Set by bulk editing records.
- we can not use Multi-select Options Sets in SSRS reports.
- There is no any option to convert a standard Option Set to a Multi-select Option Set.
- we can not create any relationship because Multi-select Option Sets can’t be included in relationship mappings.
JavaScript:
get the value from multi option-set field using JavaScript.
function GetMultiSelectValue(executionContext) {
var formContext = executionContext.getFormContext();
//Returns Array of Selected OptionSet Values: [1,2,5 ]
var selectedValues = formContext.getAttribute("vwi_multiselect").getValue();
//Returns Array of Selected OptionSet Text: ["A", "B","C"]
var selectedTexts = formContext.getAttribute("vwi_multiselect").getText();
}
set the value multi option set field using JavaScript:
function SetMultiSelectField(executionContext) {
var formContext = executionContext.getFormContext();
//Option values with comma separates
//Overwrites the Existing Selected Values
formContext.getAttribute("vwi_multiselect").setValue([3, 4, 6]);
}
If you have any questions about creating Multi-Select Option Sets you can contact with me dynamicscrm9.3@gmail.com