When a Campaign record is deleted in Salesforce, the child Campaign Member records are also deleted through a cascade deletion. If the Campaign Member object is the Master in a Master-Detail relationship with another object, the cascade deletion carries over to those child objects as well. For Campaign and Campaign Member relationships, these child objects include Contacts and Leads.
If the cascade deletion encounters too many records across Campaign Members, Contacts, Leads, or any other custom detail objects, Data Loader returns the following error message:
'Cascade deleting too many records: occurring when cascading to Campaign Member records'
Warning: Always back up your data before performing any data operation. See Export Backup Data from Salesforce or Export Data for more details. It is recommended to run a test with a small subset of records to confirm the operation was successful before proceeding with the full dataset.
Solution 1: Lower the Data Loader Batch Size to 1
The preferred solution is to lower the batch size in Data Loader settings to 1. This allows Data Loader to delete one parent Campaign record and its associated child records at a time, reducing the likelihood of triggering the cascade delete threshold.
Note: If there is a very high number of child records associated with the deleted parent, you may continue to receive the error even with a batch size of 1.
Solution 2: Delete Campaign Members First
Deleting the Campaign Members before deleting the Campaigns avoids triggering the cascade deletion of Campaign Members and their related objects.
000382550

We use three kinds of cookies on our websites: required, functional, and advertising. You can choose whether functional and advertising cookies apply. Click on the different cookie categories to find out more about each category and to change the default settings.
Privacy Statement
Required cookies are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security cookies.
Functional cookies enhance functions, performance, and services on the website. Some examples include: cookies used to analyze site traffic, cookies used for market research, and cookies used to display advertising that is not directed to a particular individual.
Advertising cookies track activity across websites in order to understand a viewer’s interests, and direct them specific marketing. Some examples include: cookies used for remarketing, or interest-based advertising.