web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Plugin to merge accounts from code

(0) ShareShare
ReportReport
Posted on by

Hello, I have a question/problem. I want to know if It is possible to create a plugin to merge several accounts with a common field. I mean, for example, I have created four accounts with a field in common, that i will use as a reference, and I want to merge them in one account. In the CRM you can only merge two accounts simultaneously but, Is it possible to do in C#=?

*This post is locked for comments

I have the same question (0)
  • Verified answer
    Kokulan Profile Picture
    18,054 on at

    Hi

    Yes you are correct the UI only allows to merge Two at a time but after two merged, you can then merge the Merged record with other remaining ones. Two at a time, thats a limitation.

    You can merge them using custom code.

    You will have to query CRM to get the records, group them by your common field.  Loop through each group and for each group, you will have to first merge two and then use the merged one to perform the merge with the next remaining one in the group.

    docs.microsoft.com/.../gg308057(v%3Dcrm.8)

    Let me know if you need any more examples or guidance on this.

  • Suggested answer
    Dynamics365 Rocker Profile Picture
    7,755 on at

    You can achieve this by Custom C# code.

    Plugin can be trigger on Update, Create, Delete, retrieve and retrieve multiple. In your case plugin can't execute. Create a window app or similar.

  • Community Member Profile Picture
    on at

    Thanks for the info. I have done that. Now I have a doubt with the uploading of the plugin. After which step should I register the plugin?

  • Suggested answer
    Kokulan Profile Picture
    18,054 on at

    Are you using Visual Studio to develop plugin using the following toolkit?

    marketplace.visualstudio.com/items

    If you are using the above, tool, you can directly deploy plugin from VS.

    Note : This tool officially only supports VS 2015.

    If you want to use Plugin Registration Tool, to register the plugin, please follow the link  below

    www.tutorialspoint.com/.../microsoft_crm_plugins.htm

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans