Hard Delete When Soft Delete Would Do
“Used Hard Delete in Data Loader. Records bypassed the Recycle Bin. Permanent deletion. No recovery.”
What Happened
Needed to clean up old test records in production. Checked the 'Hard Delete' box in Data Loader because I wanted them gone. Turns out I accidentally included real records in my CSV — about 800 Opportunities with activities and attachments. With hard delete, they bypassed the Recycle Bin entirely. No recovery possible without a backup or Salesforce support. We had to file a case with Salesforce to attempt a data recovery, which took two weeks and cost the client money.
The Wrong Way
// Data Loader → Delete // ☑ Hard Delete (Use Bulk API hard delete) // // This bypasses the Recycle Bin entirely. // Records are PERMANENTLY deleted. // If your CSV has wrong IDs, they're gone forever. // // Accidentally included 800 real Opportunities // mixed in with test data. All gone.
The Right Way
// Data Loader → Delete // ☐ Hard Delete (UNCHECKED) // // Records go to Recycle Bin for 15 days. // You can undelete them if something goes wrong. // // Also: BEFORE deleting, run a query: // SELECT Id, Name, Amount, StageName // FROM Opportunity WHERE Id IN (your-csv-ids) // Export and REVIEW the results. // Confirm these are actually the records to delete. // // Hard Delete should only be used when you've // already verified soft delete results.
The Lesson
Never use Hard Delete unless you've already done a soft delete dry run. The Recycle Bin exists for a reason. Use it.
Enjoyed this? Get more like it.
Glen's Musings — AI, investing, and building things. Occasional. Free.
More Data Mistakes
Mass Update With No Backup: The 'Undo' Button That Doesn't Exist
Ran a mass update on 50,000 records without exporting them first. Client asked to revert. I had nothing.
Read morePainfulNo Duplicate Rules: 14,000 Duplicate Accounts Later
Launched an org without duplicate matching rules. Users created duplicates for a year. Cleanup took three months.
Read moreCareer-EndingData Loader Pointed at Production Instead of Sandbox
Forgot to check the Sandbox checkbox. Updated 30,000 records in production instead of sandbox.
Read more