I'm trying to avoid record deletion based on record and/or parent status. I've tried two options:
1. Trigger validation on before delete
with a record
and add Error message
if it can't be deleted. Although it's quite ok, the page that it showed is not available in partner portal, it returns the exception page (which it's not ok)
2. So to avoid this I created a visualforce page to override the delete
action for that object. It works fine for the delete button on detail page but does not override the delete action for a related list.
Now, I'm asking if anyone has any suggestions. Thanks! Pedro.