Step 1 : Basic objects such as Contacts, Accounts are straight forward. Basic objects can be extracted from Dynamics front end or SQL Views and then loaded into Salesforce using any tool such as Data Loader, Informatica, Dell Boomi or MuleSoft.
Step 2: Load SF objects into a temp table to get linkage between CRM GUIDs and SF IDs.
Step 3: Join temp tables and Dynamics CRM data to load more complex objects such as Activities.
GetAllCRMActivitiesForSF.sql: Does all the work, including lookups (Mapping CRM GUIDs to SF IDs). You may have to replace the hard-coded values found using VerifyActivityCodeStausState.sql. Add/remove case statements as needed. I opted to hardcode values as a quick and dirty approach as this is not a permanent production solution.
VerifyActivityCodeStausState.sql: Use the script to verify activity codes, state, and state values. WRDS may have different values than Execed.
StripHTMLFn.sql : Dynamics CRM stores activity emails in HTML format. SF does not like HTML. I used the function to strip HTML. It was a good enough function for us. Alternatively, a function implemented in C# or Python will be better.
The following lookup objects were created in step # 2 [TempSFOwner], [TempSFContact],[TempSFAccount],[TempSFOpp],[TempSFRegistration],[TempSFCampaign] WhoId and WhatId are related to the following objects.
|Custom Object if any. For Exced it was Registrations|
SF throws error while loading activities for inactive users. You may have to activate the users if you want to load their activities then deactivate them at the end.