Fix Guides

How to Fix Salesforce Data Migration Failures

Step-by-step fix guide with AI-powered diagnosis from BuildForce.

Data migration failures most commonly come from validation rule conflicts, picklist value mismatches, owner ID lookups failing, missing required fields on related records, and governor limit hits during bulk insert. The immediate fix is to disable validation rules and triggers during the load, pre-stage owner IDs and lookup mappings, use Data Loader in Bulk API mode (not standard), run in batches of 10,000 with serial processing if triggers must stay on, and verify with a post-load SOQL count and checksum. BuildForce dry-runs your migration against the destination org and surfaces every blocking error before you commit the bulk load.

Symptoms

  • Data Loader error log full of FIELD_INTEGRITY_EXCEPTION or INVALID_FIELD_FOR_INSERT_UPDATE
  • Bulk load times out or hits governor limits halfway through
  • Records load but related records (lookups) fail to populate
  • Post-load record counts don't match source counts
  • Validation rules silently fire on user-edit but not on bulk load

Root Causes

  1. 1. Validation rule conflicts. Rules designed for new business reject historical data (e.g., requiring a close date in the future for a closed opportunity).
  2. 2. Picklist value mismatches. Source values don't exist as picklist options in the destination. Salesforce silently drops the value or rejects the row depending on your setting.
  3. 3. Owner ID lookups. Records reference user IDs (OwnerId) that don't exist in the destination. Common when migrating between orgs.
  4. 4. Missing required fields on related records. You load Accounts, then Contacts, but Contacts have a required custom lookup to Opportunity, which hasn't loaded yet.
  5. 5. Governor limits during bulk insert. Triggers designed for single-record processing exceed the 200-record bulk-trigger limit when Data Loader processes batches.

Fix Steps

  1. 1. Inventory and disable blocking validation rules and triggers during the load window.
  2. 2. Pre-stage a users CSV — create or activate destination users for every OwnerId in your source.
  3. 3. Reconcile picklist values: add missing values to the destination or transform the CSV.
  4. 4. Order the load: parent objects first (Account), then children (Contact, Opportunity), then junction.
  5. 5. Use Data Loader Bulk API mode, batch size 10,000, serial if triggers stay on.
  6. 6. Run a post-load verification — record counts, checksum of key numeric fields, and validation-rule replay.
  7. 7. Re-enable rules and triggers; spot-check user edits work as expected.

FAQ

Why do Salesforce data migrations fail?

Five top causes: (1) validation rule conflicts blocking inserts, (2) picklist value mismatches when source values don't match target picklist options, (3) owner ID lookups failing for users that don't exist in the destination, (4) missing required fields on related records, and (5) governor limit hits when bulk operations process records inefficiently.

Should I use Data Loader, the Data Import Wizard, or Workbench?

Data Import Wizard handles up to 50,000 records and is good for simple imports. Data Loader handles millions via the Bulk API and is the standard for migrations. Workbench is browser-based, fine for small one-offs. For anything over 100K records, use Data Loader's Bulk API mode with serial processing if you have triggers.

Do I need to disable validation rules during migration?

Often yes, with caveats. Bulk-loading historical data through validation rules designed for new business is a recipe for failure. The safe pattern: (1) disable validation rules and triggers, (2) load data, (3) run a verification query, (4) re-enable rules, (5) run a separate validation pass to catch any rows the rules would have rejected.

How do I handle picklist value mismatches?

Three options: (1) add missing values to the target picklist before migration, (2) transform the source data to use target values in your CSV, or (3) configure picklist value mappings in your ETL tool. Don't skip this step — silently dropped values create downstream reporting bugs that surface months later.

Can BuildForce dry-run a migration before I commit?

Yes. BuildForce validates a sample of your source data against the destination org's validation rules, picklists, required fields, and user lookups — surfacing every error that would block the bulk load. You see the failure list in minutes instead of after a 6-hour Data Loader job.