One of the new features in Dynamics 365 Customer Engagement / CDS is the multi-select option set attributes. This is a new type of attribute like Single Line of Text, Image, Whole Number, etc
Unfortunately multi-select option sets got some limitations:
- Cannot be used in the form header
- Cannot be used in the Business Process Flow as a data step
- Cannot be calculated or used by calculated or roll-up fields
- Cannot be used in Bulk editing
- Cannot be used in Business Rules
- 150 options max
- A default value cannot be set
- Cannot be used in the workflow designer
This last limitation is the one we will resolve in this article by using the community utility Dynamics-365-Workflow-Tools MapMultiSelectOptionSet:
In this particular example, let’s say that we want to copy a couple of multi-select option set attributes from an opportunity to a quote automatically, see the screenshots below:
You have probably noticed two new multi-select option set attributes, Business Regions and Economic Activities. They are custom fields we have just created.
Using a simple workflow, we could normally copy these attributes, but we cannot for multi-select option sets. They just won’t appear in the designer. Now you can do this using the new workflow activity MapMultiSelectOptionSet, which is part of the community solution Dynamics-365-Workflow-Tools.
To execute the MapMultiSelectOptionSet activity, we have created the workflow “Quote – Map Opportunity data“, the same you saw in our first screenshot.
The MapMultiSelectOptionSet activity has the following input parameters:
- Source Record URL: Dynamics URL of the record whose multi-select option set attributes will be copied from. Notice the Dynamics workflow designer allows you to create this URL easily for the accessible entities in the workflow context. In our example, this is the opportunity URL.
- Source Attributes: list of attributes separated by comma to be copied. In our example, this is “rtb_oppbusinessregions,rtb_oppeconomicactivities”
- Target Record URL: Dynamics URL of the record where the attributes will be copied to. In our example, this is the URL of the quote.
- Target Attributes:
list of attributes separated by comma where the original values are copied to. For the mapping to be correct, the order needs to be the same as the Source Attributes. In our example, this is “rtb_quotebusinessregions,rtb_economicactivities”
- Fail on Exception: this is a secondary attribute which allows you to indicate if the activity will throw an exception if something goes wrong or it will just return the error in an output parameter.
After the Quote is created, the workflow runs and the muti-select option set attributes are copied:
If you have enjoyed this article and you want to try this utility, you just need to download the latest Dynamics solution from this GitHub repository: