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!

2 comments:

  1. This might be a little easier to do.

    Use the export to Excel feature with re-import. Take just the Account Name and the other data fields that you have the "extra data' for into the export. Add the data from your extra data to the sheet you exported and then re-import.

    Test this first with just one row to confirm that you have the correctly copied the extra data to the correct columns you are updating.

    The re-import feature will do an insert-update to the existing records. No new records will be created.

    ReplyDelete
  2. Good suggestion Nicalaus. But what happens if you "import thousands of Accounts but a new spreadsheet is uncovered with additional data for some (but not all) of the accounts."

    As the post explains, this technique works for repairing / adding data for a random subset of records.

    ReplyDelete