The independent daily for Salesforce admins, developers and architects

Curated by Abhinav (opens in a new tab)

Recommended

Reconciling record Counts and field values before a Salesforce go-live (opens in a new tab)

You will learn a spreadsheet-based method for proving a Salesforce data migration is complete and accurate, using external keys, SOQL counts and totals, and case-sensitive value comparisons.

Why read this

You will also see how to tell nulls and truncation apart from other mismatches.

  1. Reconcile record counts per object
  2. Compare totals on amount fields
  3. Compare field values on an external key
  4. Sign off each object
The migration check runs in four steps, from counts to sign-off

A load that finishes without errors only shows that Salesforce accepted the rows sent to it. It does not show that every source record arrived or that the values arrived unchanged. The article sets out a check per object that compares record counts with SOQL, excluding records created by hand in the sandbox and records left out on purpose, and reports the difference in a status column.

Count matches are not enough on their own, so the author compares summed amounts per object and per StageName group, including the handling of corporate-currency totals in multi-currency orgs. Field values are then matched on an External ID using INDEX and MATCH, with EXACT used for a case-sensitive comparison and a sample taken for large objects. Nulls and truncation are flagged separately, because they have different causes and fixes.

The article closes with a per-object sign-off table that can only read Ready when counts, totals and value checks all pass, with a Counts only status for objects whose values have not been checked. The formulas were tested in LibreOffice Calc and are noted as untested in Excel and Google Sheets.

Read the original at dev.to (opens in a new tab)

Worth reading?