“Cascade delete” is not a term specific to salesforce.com. It’s actually a general relational database term used to describe the process by which child records are automatically deleted when their parent record is deleted or in salesforce.com (Master / Detail records). If you’ve ever deleted an Account in salesforce.com and noticed that all of the related Contacts and Opportunities also get deleted, then you’ve experienced cascade delete at work.
While most salesforce.com admins are aware that this phenomenon exists, many have not considered the implications of
cascade delete from a data protection standpoint, specifically backup and recovery.
Consider this hypothetical scenario with an active salesforce.com implementation that has an average of 3 Contacts per Account, and 4 Opportunities per Account:
- The north east regional sales rep gets fired and in a fit of rage decides to delete all 500 of his customer accounts.
- Not only have the 500 Accounts been deleted, but because of cascade delete, now 1500 Contacts, and 2000 Opportunities have been deleted.
- Those 500 hundred Accounts have now (literally and figuratively) cascaded into 4,000 deleted records.
- Not to mention all of the orders, contracts, tasks, and other custom objects that were not included in the scenario
- AND not to mention that all of those records were used to drive reports and dashboards that help you and your management team understand trends, and manage sales.
Now those 500 hundred deleted Accounts are a much bigger problem than you may have originally thought.
Recovering from such a data loss is actually a fairly complex exercise. You would first need to dig through your backups (assuming you have backups) to find all of the accounts that were deleted, and restore them. But that’s just the accounts, and since you’ve just basically created them again, they all have new salesforce.com IDs. So your next step is to continue digging through your backup files and searching for all of the contacts, opportunities, and custom objects that were associated to those accounts and updating them one table at a time with the new Account IDs. Even if you are an excel wizard this could take days or even weeks to complete, and if your database is big enough you might not even be able to use excel at all.
Furthermore, most savvy salesforce.com admins are no strangers to building custom apps that almost always include custom sObjects and lookup relationships to other objects. That means that your custom business applications other than CRM may be completely exposed to the effects of cascade delete as well.
The good news is the salesforce.com provides pretty good documentation to cover this, so make sure that you’re familiar with it.
AND make sure that you have a good backup and recovery strategy to protect your salesforce.com data in case you do ever find yourself in that (not so) hypothetical situation.