Kjell Rilbe
Kjell Rilbe

Reputation: 1509

Hook into MDriven object deletion?

I would like to hook into deletion of an MDriven object to do some checks and maybe cancel/prevent deletion. I seem to recall that this is possible, but can't find how to do it. The class is persistent, in case it matters.

Upvotes: 1

Views: 38

Answers (1)

Hans Karlsen
Hans Karlsen

Reputation: 2435

The PreDelete is the right way to do this. Return canDelete=false to stop delete.

There are several good partial methods declared per class - they are all good plug points where you can inject your own functionality.

Upvotes: 2

Related Questions