After some searching on Google, I found few dynamic forums and a LinkedIn group that were very helpful. Here is a link to the LinkedIn group. Here is scenario. I have 2 separate deployments of CRM2011. They are not connected to each other. I need to move the accounts and file attachments (notes) from one deployment to another.
The solution is consists of 2 parts
- On CRM deployment 1, I will write some custom code to create a zip file that will contain 2 CSV file and “Attachments” folder containing all the attachments.
- On CRM deployment 2. I will use built-in “Data Import” tool to import this zip file into the system.
Creation of Zip filesIn this blog, I won’t be writing any custom code to create a zip file but will explain the structure of zip file.I have created a folder named “Import”. In “Import” folder, I have created 2 files and folder as shown in the screen shot.
The account.csv file will look like the following screen
The note.csv will like the following screen.
The fieldnames “File Name”, “PhysicalFileName” and “Regarding” are very important here. They are important to import the attachments and linking to the proper account records.
- Column “Filename” will be mapped to “FileName” field on the notes entity.
- Column “PhysicalFileName” be mapped to the “Document” field on the notes entity.
- Column “Regarding” will be mapped to the “Regarding” field in the notes entity.
Now the next step will be to zip this “Import” folder into “Import.zip” file.
Importing the zip fileNow take this “Import.zip” file to the second deployment and import the file using “Data Import” tool. Here are the steps:
If the names of CSV files match the crm entities, “Data Import” wizard will map them to the appropriate CRM entities as shown the screen shot above.
Now here you can click on the entities and map the fields between your CSV files and CRM entities. I am going to map the notes entity fields in the next step
Make sure these fields are mapped as shown in the above screen shot.
If you are going to use this process on regular basis, save the data map by providing a “Data Map Name” highlighted by yellow in the above screen shot.
Click on finish. Check the record on completion of the import process.
I have attached the sample zip file here. Download it and import into your system to test it.