When a user tries to bulk delete Salesforce Event records via Data Loader, Workbench, or any API-accessible tool, the user may encounter the error “ENTITY_IS_DELETED: entity is deleted.” This article explains how to resolve the issue and delete the records successfully.
To perform a bulk delete operation and permanently remove records from the org, the user must have the “Bulk API Hard Delete” permission.
Even when a user is a System Administrator with all necessary permissions, the entire batch may be flagged as “Entity is deleted” during a bulk delete. This makes it difficult to identify the specific record causing the error. This issue typically occurs when the batch size exceeds one. For example, if a user sets a batch size of 200, one problematic record can cause the entire batch to fail.
This issue arises when the user attempts to delete a record that is already deleted in the org. For instance, if a user needs to remove unwanted data and notices that old Event records are consuming storage space, the user may attempt a bulk delete operation.
To resolve this issue, locate the record that is causing the issue from the batch you are attempting to delete.
For testing, as an sample, export 100-500 Archived Event Record IDs and follow the steps below.
1. Go to Settings.
2. Change Batch Size to "1."
3. Click OK.
By setting the batch size to 1, Data Loader processes each record individually. It will fail for the problematic record but continue processing the others.
When this operation is performed, you may see a result similar to the image below in the error message results.
If you encounter a similar pattern of error, use the following query in any API tool:
SELECT id, IsChild FROM Event WHERE IsArchived = true LIMIT 500 (for archived records)
SELECT id, IsChild FROM Event WHERE IsArchived = false LIMIT 500 (for non-archived records)
Then, perform the bulk delete operation with a batch size of 1. You may notice a pattern in the error logs or message.
The results indicate that the issue occurs only for child records that were already deleted along with the parent record that appears before the child record in the list. Therefore, you can ignore this error during the delete operation when the batch size is set to 1 in the API tool where you are performing the delete operation.
<p>Filter out the child Event records (IsChild = false) and delete only the parent records. When the parent events are deleted, the child events are deleted along with them. In this scenario, you can keep the batch size as required. Use one of the following queries. The first query returns archived parent Event records. The second query returns non-archived parent Event records.</p>
<ul>
<li>SELECT id, IsChild FROM Event WHERE IsArchived = true AND IsChild = false (if you are trying to delete archived records)</li>
<li>SELECT id, IsChild FROM Event WHERE IsArchived = false AND IsChild = false (if you are trying to delete non-archived records)</li>
</ul>
<p>Alternatively, change the batch size to 1 and ignore the error message for child Event records, because the child events were already deleted along with the parent Event records. However, when you need to delete many records, a batch size of 1 impacts performance and takes a long time. A batch size of 1 is not recommended for a larger set of records.
004461883

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.