Loading

Salesforce Error “ENTITY_IS_DELETED: entity is deleted” When Bulk Deleting Archived or Non-Archived Event Records Permanently

Udgivelsesdato: Oct 12, 2026
Beskrivelse

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.

Løsning

Cause of the ENTITY_IS_DELETED Error When Bulk Deleting Event Records

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.

Set the batch size in the Data Loader to 1. (Note: Set the Batch Size to 1 in any API tool used for bulk delete operations.)

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.

Data Loader error results with batch size 1, showing child Event records failing with ENTITY_IS_DELETED: entity is deleted while other records succeed 

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.

Event record query results showing the IsChild column, with the failed child records listed after their already-deleted parent records 

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.


Resolution Option 1: Delete Only the Parent Event Records


<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>


Resolution Option 2: Set the Batch Size to 1 and Ignore the Error for Child Event Records


<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.

 

 

Vidensartikelnummer

004461883

 
Indlæser
Salesforce Help | Article