Answered by:
Plugin to Modify Merge Records

Question
-
Hi,
I'm developing a plugin to modify Record Merge process of CRM. Normally CRM merge copy all child records of duplicated entity to master. But if there is same child records in Master it will also duplicates them. What i want to do is on pre or post (i'm not sure where should it be) i want to check duplicated child records, if there is any duplicated record in master i want to say Merge process not to copy this record one a gain and leave it.
Or is there any alternative way to say CRM not to copy duplicated child records on merge.
Is there any one manage to do it or any suggestions.Thanks
Tuesday, January 25, 2011 8:33 AM
Answers
-
Your probably going to have to look at the update message on your child entity in the child pipeline.
MSCRM Bing'd - http://bingsoft.wordpress.com Check out the CRM 4 to CRM 2011 JavaScript Converter Tool CRM Forum Guidance on how to Help Us Help You - Marked as answer by syalcin Wednesday, January 26, 2011 8:27 AM
Tuesday, January 25, 2011 11:57 AMModerator
All replies
-
You can chnage the Relationship behaviour Reparent setting to Cascade None. Locate the relationship on one of the entities, either the parent or child, and just set this value.
So if you didn't want the Account being merged to also have its contacts moved to the Master Account then you just alter the behaviour of the parent customer relationship. In this case the Type of Behaviour is set to Parental so you need to change this to Configurable Cascading and then you can chnage the Reparent value to Cascade None.
MSCRM Bing'd - http://bingsoft.wordpress.com Check out the CRM 4 to CRM 2011 JavaScript Converter Tool CRM Forum Guidance on how to Help Us Help You - Proposed as answer by RhettClintonMVP, Moderator Tuesday, January 25, 2011 10:40 AM
- Marked as answer by syalcin Wednesday, January 26, 2011 11:06 AM
- Unmarked as answer by syalcin Wednesday, January 26, 2011 11:07 AM
Tuesday, January 25, 2011 10:40 AMModerator -
Hi RhettClinton ,
Thanks for your update. This may be a part of solution, but if i set the cascade to Cascade None for merge, then none of the child records will be copied. I'm i wrong ? Me purpose is not to copy 'only same child records' .
For example let's say i create a dynamic entity for collecting customer meal selection. And let's say 1 Record have pizza,hamburger,meat / 2.records also have pizza but also chicken. What i wat to see when i merge this two records New record must have pizza,hamburger,meat,chicken . But they must be only once. I dont want to see pizza twice. this is what merge function do it shows pizza twice and it didn't check any dublication.Thank for your help
serhanTuesday, January 25, 2011 11:17 AM -
Your probably going to have to look at the update message on your child entity in the child pipeline.
MSCRM Bing'd - http://bingsoft.wordpress.com Check out the CRM 4 to CRM 2011 JavaScript Converter Tool CRM Forum Guidance on how to Help Us Help You - Marked as answer by syalcin Wednesday, January 26, 2011 8:27 AM
Tuesday, January 25, 2011 11:57 AMModerator -
Hi,
You can have a look at this to get started.
http://blogs.inetium.com/blogs/azimmer/archive/2009/10/10/merging-records-in-microsoft-crm.aspx
Thanks, Ankit Shah
Inkey Solutions, India.
Microsoft Certified Business Management Solutions Professionals
http://www.inkeysolutions.com/MicrosoftDynamicsCRM.htmlTuesday, January 25, 2011 12:08 PM -
Hi RhettClinton
,
According to your suggestion i check child entity in the child pipeline. In this context there is an property called ParentContext so i can handle that this request come from Merge operation and alsa Update information of child record.
Thanks again.
Regards,
SerhanWednesday, January 26, 2011 11:05 AM -
Thanks for your replay Ankit,
Serhan
Wednesday, January 26, 2011 11:06 AM