Run rules on delete event

It would be great to run rules on delete event. For instance, we wanted to delete all child records when a parent is deleted.

1 Like

The easiest way to achieve this is to write a rule for the child type that the entity will delete itself when it has no parent (I call my rule ‘suicide if orphan’!)

3 Likes

It works like a workaround but the behavior is not expected in general :slight_smile:

How so? What is not working as you would expect?

You can create a child record but forget about the connection field (currently we don’t have validation rules or required fields functionality). With your proposal a new record will be deleted.

Actually not. It will only be deleted if it is updated from having a parent to having no parent.
When the child is initially created (with no parent) it will survive.

1 Like