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:

15 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.


      2. Hi Ramon,

        Thanks for the heads up. I definitely give it a test run once I’m back in the office.


  1. Hi Ramon,

    I have now tested your utilities – and they are great. It was actually a combination of Get Multi Select OptionSet and Set Multi Select OptionSet that I had to use to solve my problem.

    Keep up the good work!

    Best regards,

  2. It is working nicely for an MS D365 online (v9.1), but it is failing for a D365 ON-PREMISE (v.9.0). Here are the details of the exception that I got:
    Sync workflow failed with error message – Unhandled Exception: Microsoft.Crm.Workflow.Services.InvalidCustomActivityExecutionException: System.ServiceModel.Security.SecurityNegotiationException: A call to SSPI failed, see inner exception. —> System.Security.Authentication.AuthenticationException: A call to SSPI failed, see inner exception. —> System.ComponentModel.Win32Exception: The target principal name is incorrect
    — End of inner exception stack trace —
    at System.Net.Security.NegoState.StartSendAuthResetSignal(LazyAsyncResult lazyResult, Byte[] message, Exception exception)
    at System.Net.Security.NegoState.StartSendBlob(Byte[] message, LazyAsyncResult lazyResult)
    at System.Net.Security.NegoState.StartSendBlob(Byte[] message, LazyAsyncResult lazyResult)
    at System.Net.Security.NegoState.StartSendBlob(Byte[] message, LazyAsyncResult lazyResult)
    at System.Net.Security.NegoState.ProcessAuthentication(LazyAsyncResult lazyResult)
    at System.Net.Security.NegotiateStream.AuthenticateAsClient(NetworkCredential credential, String targetName, ProtectionLevel requiredProtectionLevel, TokenImpersonationLevel allowedImpersonationLevel)
    at System.ServiceModel.Channels.WindowsStreamSecurityUpgradeProvider.WindowsStreamSecurityUpgradeInitiator.OnInitiateUpgrade(Stream stream, SecurityMessageProperty& remoteSecurity)
    — End of inner exception stack trace —

    1. Hi Leo, thanks for your comment. This may be due to a misconfiguration in the sandbox service. Does It happen always? Does it happen for other plugins/workflows running in sandbox?

  3. Hello! Is it possible to update multi select optionset based on other fields value (same entity)? I have 3 check boxes and need to update one multi select optionset based on those checkboxes.

  4. Hi Ramon
    Thanks for this, really helpful given the lack of funcationality in OOB workflows and flows. You’ve saved me a whole load of work.
    I have one question please – is the CDS solution aimed at Flow, or is it just to remove dependencies?
    Best regards, Alex

    1. Hi Alex, glad to hear your feedback 😊 Regarding your question, could send me some screenshot, please? Not sure where you are looking at. You can send me a direct message on LinkedIn or Twitter and I’ll check it out.

  5. Hi Ramon,

    Curious if there is a way to get this to copy the multi-select option field into a single line of text field (comma separated would be ideal)? We have some limitations with our data warehouse and can not push over multi select option fields.

Leave a Reply

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

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

Facebook photo

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

Connecting to %s