XRM Tricks (Power Platform & Dynamics CRM )
Merging records on Dynamics 365 CRM is a very powerful feature that prevents duplicate records. I was asked to study this feature for a client who wanted to clean up his customer records, and we reached a point where we had to merge accounts that were related to active quotes. If you didn’t know it, Dynamics 365 For Sales disallows this operation by showing this error message:

After some investigations, I realized that an internal plugin of the Sales module prevents this operation. Actually, it is about the “Microsoft.Dynamics.Sales.Plugins.PreOperationAccountMerge” plugin.
This plugin is internal to Dynamics 365. I could not find out more from the default solution or from the Plugin registration tool. But it’s ok, everything can be shown on the “sdkmessageprocessingstep” table. I used the following fetchXml to see more details:
<fetch> <entity name="sdkmessageprocessingstep" > <link-entity name="plugintype" from="plugintypeid" to="eventhandler" > <filter> <condition attribute="name" operator="eq" value="Microsoft.Dynamics.Sales.Plugins.PreOperationAccountMerge" /> </filter> </link-entity>…
View original post 956 more words