Skip to main content

Notifications

Microsoft Dynamics CRM (Archived)

How can I prevent copying related records of the child record to master record in the OOB Merge functionality ?

Posted on by

The dynamic CRM Merge functionality will set the related records of the child record to the master record. But, I don't want this to happen. Can I do this on Merge message in plugin? Or is there any other way or approach to achieve this?

Can anyone please help me?

*This post is locked for comments

  • Verified answer
    Ancy Profile Picture
    Ancy on at
    RE: How can I prevent copying related records of the child record to master record in the OOB Merge functionality ?

    Finally I have taken an approach to write Pre and Post operation plugin on merge message of master entity.

    On Pre merge operation I have retrieved collection of all related entities and context data. Stored it in a shared variable. And finally used it in post merge operation to revert the changes done by OOB Merge.

    And it worked!!

  • Ancy Profile Picture
    Ancy on at
    RE: How can I prevent copying related records of the child record to master record in the OOB Merge functionality ?

    Thank you very much for the reply. This suggestion really seams to be a correct way to achieve the requirement. I will try doing it practically. Thank you.

  • Suggested answer
    tw0sh3ds Profile Picture
    tw0sh3ds 5,600 on at
    RE: How can I prevent copying related records of the child record to master record in the OOB Merge functionality ?

    First solution I can think of is a plugin on Update of that related records. In this plugin you have to check if this Update is caused by Merge message (you have to check the parent plugin context). If this is coming from merge, simply remove the attributes which are pointing to the new parent record (in such case the parent will not be changed)

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!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

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