AnsweredAssumed Answered

How do I prevent a relationship from being deleted if conditions fail in before_relationship_delete logic hook

Question asked by Nathan McClintock on Sep 20, 2016
Latest reply on Sep 21, 2016 by Alan Apter

I have a before_relationship_delete hook in my contacts module.

 

It checks for certain conditions before allowing a relationship to be deleted. The error displays correctly as expected and it looks like all went well - but if I refresh the page, the relationship has been deleted. The error does not prevent this from happening.

 

Is there some way to prevent the removal of the relationship based on arbitrary criteria?

Outcomes