Gluon Digital

Offical carrier of the Strongforce

icon

FAQ: I have a field that got migrated incorrectly. It wasn't discovered until a after go-live, and users updated some records. How do I fix it?

FAQ: I have a field that got migrated incorrectly. It wasn't discovered until a after go-live, and users updated some records. How do I fix it?
31/12/2018
David Masri         Author:
David Masri
Founder & CEO

When you are migrating your data to Salesforce it's not uncommon to be migrating dozens of objects and hundreds of fields. Regardless of how thorough your testing is, defects may be found weeks, even months after go-live. Your users are going to want you to fix the data, but if you simply Upsert over the bad field, all changes made by users since go live will be lost (at least for that field). The key here is to identify the effected records, and then Identify which of the effected records had the field modified by users. (If you are tracking field level changes for the field in question, this becomes a non-issue) Here's what you need to do:

  1. Backup your original transformation code* or the original data set used for migrating the object in question.

  2. Fix the transformation code or the data set.

  3. Compare the dataset created from your new transformation code to the one created from the original code. Include only records in which the field in question has changed. This becomes the target record set to fix.

  4. Now match this new dataset (target records to fix) to what's in Salesforce. If the Salesforce record's created-date matches its last modified date, then you know the record has not been touched since go live and you can update it safely.

  5. For the rest of the records (in the target records to fix record set), you can generate a report for your users to fix manually. Include the following:
    • The Salesforce Record ID
    • LastModifiedBy
    • The current value for the field in question (in Salesforce)
    • The original value (as it was when migrated)
    • The new value (per the new transformation code)

  6. If there is too much data to fix manually, you can ask your users whether you should fix records in which the current value matches the original value set as part of the migration. For these records, it's probably safe to assume the value in field in question has not changed since the migration (something else changes that updated the last modify date). Hopefully, this cuts down substantially on the number of records that users need to fix manually.

*Best Practice #8 is "Data Transformations Should be Centralized" so this should be easy, I have not written an article on this, maybe I will, maybe not, but you can always buy the book 😊.

This article is adapted from my book: Developing Data Migrations and Integrations with Salesforce. Have a question you would like to as see a part of my FAQ blog series? Email it to me! - Dave@SalesforceDataBlog.com