
Andrew Hanna

Andrew Hanna

TL;DR: A Salesforce click deploy has no native undo button. The Metadata API rolls back a deployment that fails, but once one succeeds, going back means redeploying the previous version, deleting what was added and restoring any data by hand. Take a snapshot before you click, or use a tool that takes one for you.
A click deploy moves metadata between orgs through a UI: you compare a source and a target, tick the changed components, validate and deploy, with no change set and no command line. The term comes from ClickDeploy, which Copado now sells as Copado Essentials; we cover the tool and its pricing in how ClickDeploy works and what it costs. Most guides stop at the deploy. This one covers what happens when you need to take it back.
In production, nothing changes. Salesforce only accepts all-or-none deployments there
(the rollbackOnError option must be true), so the Metadata API rolls the
whole transaction back on error and the org stays as it was. The Salesforce CLI rolls
back by default and lets you override that with --ignore-errors, but its
own reference
says never to use it against production, because components with errors are skipped
and the org can end up inconsistent. If a deploy fails, fix the cause and rerun it;
our guide to
click deploy errors
walks through the usual culprits.
Not natively. As Gearset puts it, change sets cannot reverse a deployment and neither can DevOps Center, and change sets cannot make destructive changes either. A successful deploy is simply the new state of the org. To go back, you run a second deployment that restores the old state, and that only works if you kept a copy of it.
That makes the backup, not the rollback, the step that matters. If nobody captured the target components before the click, you are rebuilding them from memory.
destructiveChangesPost.xml manifest so they
are deleted after the restore succeeds.
--dry-run
in the CLI) with the same Apex test level you would use for any production release.
Steps 2 and 3 are where most rollbacks go wrong, which is why the click deploy checklist makes a backup part of the pre-flight, not an afterthought.
For Salto, Flosum, Blue Canvas and any other tool on your shortlist, ask the same two questions: is the backup automatic or opt-in, and can you roll back one component without reverting the whole release?
--purge-on-delete skips the
Recycle Bin, so there is nothing to restore.
The more reliable fix is a history you can replay. Deploying from a branch means every release was committed before it shipped, as shown in click deploy from Git.
Tekunda is the Salesforce consulting and product company behind Serpent, the DevOps platform it also runs on its own client delivery. Serpent keeps the click-to-select workflow while Git and pull requests run underneath, so every release has a version to return to. Rollback is one click, for a single component or a full release. Teams on Copado can follow our migration path, plans are on the pricing page, and more guides live in the SF Guides library.
Does Salesforce have a rollback button for deployments?
No. Change sets and DevOps Center cannot reverse a deployment. You redeploy the previous version or use a tool that snapshots the org first.
Does a failed click deploy change anything?
Not in production, where Salesforce requires all-or-none deployments. The Salesforce
CLI also rolls back on error unless you pass --ignore-errors.
Can I roll back data with a deployment rollback?
No. Rollbacks restore metadata only, so records need a separate data backup and restore.
How long can I restore a deleted custom field?
For 15 days, unless it was erased or purged. Some attributes must then be restored by hand.
Commitment free!