Loading

Enable 'cascade delete on custom lookup relationships' feature

Publiceringsdatum: Apr 22, 2026
Beskrivning

This feature allows lookup relationships 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 lookup to Account, and want to ensure that when an Account is deleted, all related Projects are also removed automatically.

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 will hold 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’ll get an error saying that B can’t be deleted because it’s linked to C.

WARNING:

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:

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

Lösning

Support involvement is required for Cascade Delete to be available in your Salesforce Organization.

Requesting Activation

To request activation, have a System Administrator create create an Activations request with Salesforce Support.

Please also include the following in your request:
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 (YES/NO): 

Knowledge-artikelnummer

000382017

 
Laddar
Salesforce Help | Article