Wednesday 2 January 2013

CRM 2011 Data Import (Update existing records)

A useful technique for updating existing data (or repairing mistakes!) is as follows:

  1. Import source Data
  2. Create new custom entities for each entity to be updated e.g. AccountData
  3. Create a lookup to the parent entity (e.g. Account) on the custom entity
  4. Add identical attributes (or new ones) to store the data to be added / modified on the main entity
  5. Create a workflow rule on the custom entity to update it's 'parent' record!
  6. Import additional data into custom entity
For example, you import thousands of Accounts but a new spreadsheet is uncovered with additional data for some (but not all) of the accounts.

In fact, the spreadsheet is in a slightly different structure to the original imported data.

In this scenario, you cannot simply export (for re-import) the existing Accounts, and copy the new attribute(s) data.

Rather than delete all of the data and start again (which certainly won't be possible for a production deployment), or use an external data migration tool (costly), the technique above will help you update just those records with additional data.

It is also re-usable. The "AccountData" entity records will effectively provide you with an audit of any additional data migration routines.

Simple, but very effective!