Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

Manipulating values in an Option Set in Dynamics CRM

Posted on by 310

Hello, need some ideas on this.

I have a field in CRM known as Activity Stage. It had the following values:

A

B

C

D

E

F

I have to update it with the new values. The new values of the field are:

A

B

CC

Values C, D, E, F are mapped to Value CC which is a new value. I have mapped the old values with the new values and now the Option set looks like this:

A

B

CC

CC

CC

CC

Now, when I create a new opportunity, the list has 4 values with the same name. Is there a way I can merge these 4 values. Deleting the values would not work. Also, import/export is not working as the values of the fields in the option set is different.

Thank you.

*This post is locked for comments

  • Huzefa Bootwala Profile Picture
    Huzefa Bootwala 310 on at
    RE: Manipulating values in an Option Set in Dynamics CRM

    Hello,

    Tried this method multiple ways but couldn't get the result.

    I mapped the same field from the source and destination and remapped the option set values but it does not get updated.

    Also, I created another field with new values and mapped the old values to the new ones. Still not working.

    Thank you.

  • Huzefa Bootwala Profile Picture
    Huzefa Bootwala 310 on at
    RE: Manipulating values in an Option Set in Dynamics CRM

    Hello,

    Tried this method as well.

    It shows an error that one or more record did not get updated.

  • Huzefa Bootwala Profile Picture
    Huzefa Bootwala 310 on at
    RE: Manipulating values in an Option Set in Dynamics CRM

    Hello,

    Having issues with this method.

    I have my original values in a field "Activity Stage".

    I created another field "Activity Stage 1" with the new values.

    I am trying to retrieve and update data from the same organization. Is this ok or we cannot do this?

    I am retrieving both the fields from the source and only mapping Activity Stage 1 in the destination because I want the data to be written in Activity 1.

    The values are not getting updated.

  • Huzefa Bootwala Profile Picture
    Huzefa Bootwala 310 on at
    RE: Manipulating values in an Option Set in Dynamics CRM

    Hello,

    I have just deleted the value in the Sandbox.

    This method sounds good to me.

    Will try it using SSIS. I am just worried about the primary key.

    I had tried using the accountid field for migration but it did not work.

    Whenever we create a new account, accountid gets updated on its own?

    Does it get a new value when an account is created?

    Thank you.

  • Huzefa Bootwala Profile Picture
    Huzefa Bootwala 310 on at
    RE: Manipulating values in an Option Set in Dynamics CRM

    Hello,

    I would try this method and see if everything works ok.

    Just a question outside this. I understand there is a primary key for the entity be default.

    Is there a way to get hold of the guid for example of accounts.

    I am using dynamics crm online.

    Thank you.

  • Suggested answer
    Aric Levin Profile Picture
    Aric Levin 30,188 on at
    RE: Manipulating values in an Option Set in Dynamics CRM

    One more option. Use Bulk Edit.

    Create a personal view that shows all records with the Stage field.

    Select all the fields that have Initial meeting as the value of the Stage field, and change them to Discovery

    Select all the fields that have Demo as the value of the Stage field, and change them to Discovery

    That should be it.

  • Aric Levin Profile Picture
    Aric Levin 30,188 on at
    RE: Manipulating values in an Option Set in Dynamics CRM

    You should not have deleted the 3rd value.

    OLD VALUES      NEW VALUES

    1 - Suspect              1 - Suspect

    2 - Initial Meeting   3 - Discovery

    3 - Discovery          

    4 - Demo                

    NEW VALUE

    1 - Suspect

    3 - Discovery

    Map All 2 Records to 3

    Map All 4 Recorder to 3

    You only need to values, but before that you need to make sure that all the values that are not 2 or 4, are modified to 3.

    If you do that your counts will be the same.

    Total Number of Opportunities (Discovery Only) should be 183.

  • Huzefa Bootwala Profile Picture
    Huzefa Bootwala 310 on at
    RE: Manipulating values in an Option Set in Dynamics CRM

    Let me simplify

    OLD VALUES      NEW VALUES

    Suspect              Suspect

    Initial Meeting   Discovery

    Discovery           Discovery

    Demo                Discovery

    This is the scenario

    I have the option set with the NEW VALUES. I deleted the third entry and after that how would I find the opporunities based on the third entry?

    Total number of opportunities (Initial Meeting + Discovery + Demo) = 183 (Left hand side search)

    Total number of opportunities (Discovery + Discovery) = 160 (right hand side search)

  • Aric Levin Profile Picture
    Aric Levin 30,188 on at
    RE: Manipulating values in an Option Set in Dynamics CRM

    There is always a primary key to the entity. The primary key is a Guid field (it is called the entityname followed by id). For examples the primary key for Account entity is accountId.

    You can use custom code, but SSIS would probably be the easiest way (unless you only have a few records, in which case you can update them manually).

    In SSIS you would basically do the following:

    Read the data from the entity (basically I need the Entity Id (Guid), the picklist value and text)

    You can do add an optionset mapping component to remap the values of the optionset (If using Kingswaysoft for example)

    The add a destination component with an Update action, and just set the Entity Id and the optionset.

    This should be a simple and straightforward process.

    You can test it out, by filtering your fetchXml or SQL Statement to just return 1 record and test it.

    Hope this helps. I think this is the best solution that I would have to re-assign values of an optionset.

  • Huzefa Bootwala Profile Picture
    Huzefa Bootwala 310 on at
    RE: Manipulating values in an Option Set in Dynamics CRM

    Hello,

    Did not understand the login.

    There is just one field which is using this option set. How can I remap individual values of the option set?

    And I would not prefer using SSIS. I have already faced a lot of problems as there is no primary key in the entities.

    Thank you.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,253 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,188 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans