Is it possible to take the data from the contacts entity and migrate to the Leads entity and maintain the relationships in Dynamics CRM?
Thanks,
Naveen
*This post is locked for comments
Is it possible to take the data from the contacts entity and migrate to the Leads entity and maintain the relationships in Dynamics CRM?
Thanks,
Naveen
*This post is locked for comments
Hi NKumar
if you solved the problem thanks to an answer, please mark it as verified to encourage the community to provide more and more a better support. Thank you. Francesco
If you found the answer helpful, please mark as Verified
Thank You & Best Regards
Francesco Picchi
Microsoft Dynamics CRM Consultant, Bologna, ITALY
Independent Contractor
Hi,
it depends on what kind of relationships you need to maintain - if those are not just lookup fields (for which you can probably simply copy data from contacts to leads), you'll need to migrate those 1:N and N:N relationships, too (which is doable, but it would be a separate "step in the migration process)
You should be able to easily do it using an SSIS package and KingswaySoft.
I would basically read all the Contact records, manipulate the data as needed, and Create the Lead records. As mentioned, have the Contact information (id) stored in the Lead record so that you can link between them.
Since you are using CRM On-Prem, you can also use an OLEDB Source and access the FilteredView directly when READING the Contact information, in case you need to access other related records or entities (although, this case also be done with fetchXml and a CRM Source Component).
Hope this helps.
I writed the following code for you.
Hope it helps.
Dictionary<string, string> attributeNameDict = new Dictionary<string, string>(); attributeNameDict["emailaddress1"] = "emailaddress1"; // system attribute attributeNameDict["fullname"] = "new_fullname"; // custom attribute
// etc ... List<Entity> contactList = null; // ... retrieve list; foreach (Entity contact in contactList) { Entity newlead = new Entity("lead"); foreach (KeyValuePair<string, string> kvp in attributeNameDict) { newlead[kvp.Value] = contact[kvp.Key]; } newlead["new_contactid"] = contact.ToEntityReference(); svc.Create(newlead); }
If you found the answer helpful, please mark as Verified
Thank You & Best Regards
Francesco Picchi
Microsoft Dynamics CRM Consultant, Bologna, ITALY
Independent Contractor
you can export the data as excel and import them into the lead Entity after moving the data from the exported excel to the Excel Template of the lead
and you can set the link of the contact in the lead Entity in the field existing contact.
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,280 Super User 2024 Season 2
Martin Dráb 230,214 Most Valuable Professional
nmaenpaa 101,156