Hi Magor,
Basically, the merge request is a process that cannot be undone
community.dynamics.com/.../the-effect-of-merging-records-on-data-integration.aspx
"The merge process cannot be undone. If you want to unmerge two records, there is no going back. Once field have been updated and related records like contacts and addresses have been moved to the primary record, there is nothing that tells you what the picture looked like before the merge."
Once you merge, you can choose which one is the Master right, while the other would become the deactivated record.
Through the CRM UI, advanced find, there is no flag of this except the deactivated record, a status code = inactive
But you don't know which one is merged and to which record is merged, unless for Case there is related merged case you can see through the UI.
But, for this case, actually CRM has fields: Merged and Master ID for you to see,
but those fields are mainly for internal user, unfortunately, CRM did not expose it out.
If you can do SQL Query:
select accountid,name,merged,mergedname,masterid,masteraccountidname,modifiedon,modifiedbyname from FilteredAccount where merged=1
If not then you use ODataQuery or using power query in Excel to view the list
Or you can also query using the SDK.
Yes, need programmatically.
Or you can try to interfere the MergeRequest using plugin Merge message to maybe save to another entity the merge record logs or update the merged records field to make it appearing, you can create two custom fields or just use the simple update request Plugin.
Up to you.
Can be reparent?
I think you can do it programmatically as long you have the merged field and masterID record then it should be possible but little bit though because you don't know which field you were using when you choose to merge field.
You need to
- Get the merged record ID
- Get the merged record Master ID
- Get the fields changed
Difficult because you did not know which field you were choosing right?
Because during Merge form you can choose which field you choose, either from Master record or from another record, once you merge, it will always auto update the Master with new fields (chosen from the merge Form) and deactivate the other one.
So in this case, undo is not possible, unless your 'undoing' is just to re-activate the deactivated record, but not updating the master record.
You might try to take a look to the auditing request to get the updated field.
Kind of a lot of task to do.
Hope this could give you the concept.
Thank you so much.