Importing Parent-Child data into Dynamics CRM 2011
Introduction
One of most important part of data migration from conventional systems to Dynamics CRM 2011 is the data import. Import of data for usual entities such as account, contact, ... is somehow straight forward. One of most asked questions in the Dynamics CRM 2011 forums is the instruction for the import of parent-child data such as quotes, orders, invoices and contracts. As you know the sales chain for the three of most used entities is as follows:
Instructions
Hence, importing data which could contain all necessary fields, status, reason and products is a challenging job. To import such data follow instructions below:
- Heads import: in this step you should first import the heads in their initial status. Be aware about the status of the records. If you change the status of an entity (such as quote), when importing it, you could not import products or matched orders. To handle this issue you have to create two new fields for each entity (two for quotes, two for orders and two for invoices). These fields are used to save the status of the records until the end of the data import.
At the end of this step all the quotes, orders and invoices are imported and they are all at their initial states i.e. all quotes are draft.
- Products import: In this step, you should import the products for their regarding quotes, orders and invoices. Remember that all the heads are in their initial status, hence you could import the products. Otherwise (status mapping for the heads), no products could be imported.
At the end of this step data is imported and matched. Again remember that the records are in their initial status.
- Change of the status: The data is imported now. The only job is the status change to done. You could change the status using three methods, based on you data size. For small data size, you could use workflows. First, using advanced find view search for your desired data (quotes with active ISTATUS), then change the status with a new workflow to active status.
For data size of NOT SMALL, you could use a custom plugin or DB update to change the status of the data. If you want to create a plugin refer to this walkthrough. The plugin could be fired on a fake event (such as creation of a case), to query all the desired data and change their status.
Other method for status change is DB update, which I prefer. Remember that from the MS support point of view, DB updates are not a good and desired job!
At the end of this step the data is imported and the status is mapped. The link between all the data is created. Hence, the imported records could be used at the rest of their sales procedures.
Other Languages
This article is also available in other languages: