Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

Copying Option Set field value from one entity to another

Posted on by

Hello,

I need to copy the value a field (option set field) into another entity onLoad. Do I need to do a JSON call to do that?

Thanks!

*This post is locked for comments

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Copying Option Set field value from one entity to another

    0488.aaa.jpgwe cannot update option set value to other option set through wkflw here Op1 is optionset of primary entity and tried to set value from child entity option set bu it is not enabling fields in Looking for if we select OP1.

    so go for coading

  • Suggested answer
    Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Copying Option Set field value from one entity to another

    here mapping will work only when we r creating record from primary entity( mainly on click of subgrid) so as u want to set only one field go for realtime workflow or Odata

  • Suggested answer
    Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Copying Option Set field value from one entity to another

    if we have relation then we can map fields or we can run workflow. if no relation go for Odata(webapi)

  • Suggested answer
    Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Copying Option Set field value from one entity to another

    Hi Fitsum

    Option sets are very much different than Lookup values on an entity. From a performance viewpoint, an option set is faster to return a value than a lookup value. From the copy from one entity to another, they are a bit more tricky.

    Firstly, an option set holds a numeric number with a corresponding text value. So even I have two option sets in two different entities I have to check that the values in the first option set are not only the same but also have the same corresponding value. It is possible to have two options sets which are matched 100% correctly in the two entities, however, the maintenance in holding the two option sets in sync to high.

    The global option set presents a possibility to assist in the maintenance of one global option set, which can be used in both entities. Reducing the need to maintain two option sets in sync over two entities. This may cause duplication in your entities as there maybe option sets out of the box that are not global option sets. You will need to weight up the pros and the cons for this.

    As an aside, remember the work that you put together will be required to be maintained by yourself and someone else in the future. So look at ways of assisting yourself and others in making the maintenance of your decision easier.

    If you found my response helpful, please mark “Yes” to confirm it helped you.

  • Suggested answer
    Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Copying Option Set field value from one entity to another

    Hi Fitsum,

    First thing you have to make sure is Both Option Set fields (Entity 1 & 2) should use same global  Option Set.

    Then you can write Javascript or Real Time Workflow to Populate Entity 2 - Option Set field based on another Entity 1 field.

    Please mark as Verified if this helps.

    Thanks,

    Himanshu Prajapati

  • Suggested answer
    Nithya Gopinath Profile Picture
    Nithya Gopinath 17,074 on at
    RE: Copying Option Set field value from one entity to another

    Hi,

    Is there any relationship between the two entities? If yes, you could write Javascript to copy the value of the option-set field from the related entity record.

  • Suggested answer
    a33ik Profile Picture
    a33ik 84,323 Most Valuable Professional on at
    RE: Copying Option Set field value from one entity to another

    Hello,

    If your entities have 1-N relationship then you can use mapping - crm.fullscope.com/save-time-entering-data-into-crm-by-mapping-fields-between-records for population of data for child record created from context of parent.

  • Fitsum Profile Picture
    Fitsum on at
    RE: Copying Option Set field value from one entity to another

    It's two different entities. The option set field will be set in Entity 1, I need to pass that value into Entity 2 field?

  • Suggested answer
    Gopalan Bhuvanesh Profile Picture
    Gopalan Bhuvanesh 11,397 on at
    RE: Copying Option Set field value from one entity to another

    Hi,

    How do you identify the other record from the current form?

    Please refer the following:

    mehmetgunen.com/get-set-value-of-a-crm-option-set-value-field-using-javascript

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,269 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,198 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans