How to copy Notes and Activities while converting Contact to Lead in Microsoft Dynamics CRM 2011

StackOverflow https://stackoverflow.com/questions/22606496

I have a requirement to copy all Notes and Activities while converting Lead to Contact and vice versa.

When I Qualifying Lead to Contact I use my custom plugin which is triggered by QualifyLead event. There is no out of the box solution to convert Contact to Lead so I use my custom on-demand dialog. But this dialog unable to run my custom plugin (which will copy Notes and Activities from Contact to Lead).

Please help me to find a way to copy all this stuff from Contact to Lead.

有帮助吗?

解决方案

You can create a Custom Workflow Activity with the code of your custom plugin and uses as step inside your on-demand dialog.

You can start from here:

http://msdn.microsoft.com/en-us/library/gg328515.aspx

其他提示

Another way that you can do this is to simply reference the notes from the Lead in the Contact, Account, or Opportunity entities using an IFrame and some JavaScript as described in http://030bacf.netsolhost.com/WordPress/?cat=69 . Depending on how many records you have, potentially this could even be a better solution since you are only keeping one copy of the notes which will help keep the size of the database more manageable and performance better. Or you could use this solution for the notes and the solution recommended by Guido for the Activity records. I had to make a change to the URL used for CRM 2013 and have copied that part below.

//src="/"+context.getContext().getOrgUniqueName()+"/_controls/note/notesdata.aspx?id="+lookupItem[0].id+"&ParentEntity=3&EnableInlineEdit=false&EnableInsert=false";
// change to this for CRM 2013
src=serverUrl+"/"+Xrm.Page.context.prependOrgName("/_controls/notes/notesdata.aspx?id="+lookupItem[0].id+"&ParentEntity=3&EnableInlineEdit=false&EnableInsert=false");
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top