Get Dynamics 365 OptionSet labels in Copy Activity

John Aherne 516 Reputation points
2020-06-17T00:49:24.883+00:00

Is there any way to get optionset labels from a Dynamics 365 entity using a copy activity?

All I can seem to get is the option number when I query an entity (using Common data services and Dynamics 365 linked services)

Thanks!

Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
10,567 questions
0 comments No comments
{count} vote

Accepted answer
  1. Daniel Holth 81 Reputation points
    2020-10-29T15:00:30.717+00:00

    Instead of leaving this half answered. I'll share how I added option set text. Instead of having a single Copy Activity you will need atleast two. The first is to get your entity. The 2nd is to get the entity called "String Map". This contains the key number and value text for each option set on every entity. For the 3th step I used a stored procedure to join the StringMap.Key with your entity.fieldNumeric. Both of these are integers. How you combine them is up to you.
    36113-image.png

    1 person found this answer helpful.

1 additional answer

Sort by: Most helpful
  1. ChiragMishra-MSFT 956 Reputation points
    2020-06-17T06:44:10.317+00:00

    Hi @John Aherne ,

    Regular OptionSets can be mapped in ADF as integer type, but "MultiSelect Option Sets" can't be mapped to ADF integer type.

    As a workaround, you can use a third party workflow tool (msdyncrmWorkflowTools) to write the text values of the MultiSelect Option Set as a comma-delimited string in a separate field within Dynamics 365. From there you should be able to ingest the field as a string type and parse the values.

    Ref - https://github.com/MicrosoftDocs/azure-docs/issues/28027#issuecomment-628114669

    Hope this helps.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.