Loading

Enable the Cascade Delete on Custom Lookup Relationships Feature in Salesforce

Udgivelsesdato: Oct 11, 2026
Beskrivelse

The cascade delete feature allows custom lookup relationships in Salesforce to automatically delete child records when a parent record is deleted, similar to master-detail relationships. For example, this might be useful if you have a custom Project object with a lookup to Account, and you want to ensure that when an Account is deleted, all related Projects are also removed automatically.

Because Support must enable this feature, this article explains how cascade delete works, the warnings and limitations to review first, and how to request activation.

Løsning

This article answers how to enable the cascade delete feature on custom lookup relationships in Salesforce, which requires a request to Salesforce Support. It covers how the feature behaves, the warnings and limitations to review first, and how to request activation.

Example Cascade Delete Scenarios

In a chain of lookup relationships, these behaviors work independently on each target field at each level.

For example, field A is the target lookup of field B, which is the target lookup of field C. You can have a delete restriction on A and none on B, which means that A can't be deleted but B can. Once B is deleted, the relationship between A and B no longer exists and C holds an empty value for the lookup.

In a multilevel lookup relationship, these options might conflict. For example, in the scenario where field A is the target lookup of field B, which is the target lookup of field C, you might specify that A can delete B, but B can't be deleted because it's in a relationship with C. If you try to delete A, you get an error saying that B can't be deleted because it's linked to C.

Warning About Security and Sharing

A cascade delete bypasses security and sharing settings, which means users can delete records when the target lookup record is deleted even if they don't have access to the records. To prevent records from being accidentally deleted, cascade delete is disabled by default.

Notes and Limitations

  • Cascade delete and its related options aren't available for lookup relationships to standard objects.
  • Field History Tracking: If the parent record in a lookup relationship is deleted, the field history tracking for the child record does not record the deletion. For example, if a parent account is deleted, the Account History related list for the child account does not show the deletion.
  • The feature can also be used in scenarios where the following error is encountered:
    'Delete Operation Too Large. You can't delete more than 100,000 combined objects and child records at the same time. Select fewer records to delete. If you're trying to delete one object that has more than 100,000 child records, delete an appropriate number of child records before deleting the object. Click here to return to the previous page. DELETE_OPERATION_TOO_LARGE:Cascade deleting too many records.'

Prerequisites

Before you contact Support, review the article Cascade Delete does not work on Custom Lookup Fields.

Requesting Activation

Support involvement is required for cascade delete to be available in your Salesforce organization. To request activation, have a System Administrator create an Activations request with Salesforce Support.

Include the following statement in your request, and answer YES or NO: I understand that the cascading deletion functionality bypasses security and sharing settings, which means users can delete records when the target lookup record is deleted even if they don't have access to the records.

Vidensartikelnummer

000382017

 
Indlæser
Salesforce Help | Article