doDev – Admin & Dev Toolkit for Salesforce

How to compare Apex and metadata between Salesforce sandbox and production

Short answer: change sets don’t show what is different between two orgs. The usual way is to retrieve both orgs’ metadata with the Salesforce CLI and compare the folders in an editor. doDev, a free Chrome extension, compares the two orgs you are logged into directly and shows a side-by-side diff.

Compare Code & Metadata in doDev: a project tree with changed and identical counts, and a side-by-side diff of an Apex class

Compare them with doDev

  1. Install doDev and log into both orgs in the same browser (e.g. a sandbox and production).
  2. Open doDev and go to Compare → Code & Metadata.
  3. Pick the two orgs. Everything is compared by default; ⚙ What to compare narrows it to some types or names.
  4. Click Compare code & metadata.

You get:

For a single class, Find Any Metadata → ⇄ Compare with shows the same diff without comparing the whole org.

Doing it without a tool

Retrieve both orgs with the Salesforce CLI (sf project retrieve start --manifest package.xml --target-org …) into two folders, then compare the folders in VS Code or with git diff --no-index.


More how-to guides: all guides · doDev help