+ Start a Discussion

Trigger to prevene record deletion without throwing error

I would like to prevent a user from deleting a Contact record based on certain logic based on record attributes.
However, instead of outputting an error message, I would like to update a record ownership, and not show the error to the user.

In short, can I prevent deletion without throwing an error?
Hello AxxxV,

What I would probably do is build an s-control that would be used to override the standard delete button. The s-control can have any criteria that you want in it to determine if it should delete the record or do something else.
Thanks for the reply. This is exactly what I ended up doing. The trigger solution would have been better though if it were possible. It would enforce my rules on the db level, rather than at UI only when done with an S-Control...