Copying multi-select option sets in workflows

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

Dynamics Attributes Types

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:

Dynamics workflow using the new Map Multi-Select Option Set utility

Before getting into the details, notice I have written another couple of articles to get multi-select options attributes and update 
multi-select options attributes
 in workflows.

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:

New Dynamics 365 UI – Opportunity with multi-select option set attributes
Creating a Quote from the “Quotes” tab in the Opportunity form. 
Quote copied from opportunity, apart from multi-select option set attributes

You have probably noticed two new multi-select option set attributes, Business Regions and Economic Activities. They are custom fields we have just created.

Custom muti-select option set “Economic Activities”

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.

Dynamics-365-Workflow-Tools MapMultiSelectOptionSet custom workflow activity  

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.
Dynamics-365-Workflow-Tools MultiSelectOptionSet input parameters

After the Quote is created, the workflow runs and the muti-select option set attributes are copied:

Business Regions and Economic Activities have been copied onto the Quote

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:

https://github.com/demianrasko/Dynamics-365-Workflow-Tools/releases

5 thoughts on “Copying multi-select option sets in workflows

    1. Thanks Neil your feedback! I’m waiting for @demianrasko to review the GitHub merge and carry on the pull request. This should happen in the next weeks. In the meantime, you could download the code from my forked repository and compile it with this new feature if you need it urgently.

      1. Hi Ramon,

        Thanks for your reply. I’ll wait for Demian’s official release then as I’m not a developer 🙂

        I am looking forward to testing this, as it could really solve some functionality limitations for our company.

        BR,
        Niels

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s