I want to prevent a record from being deleted based on certain conditions in NetSuite. However, I can't seem to find a failure event on validation? BeforeSubmit on a UserEvent has a delete type, but it doesn't have a return value for the function, so I can't just say return false, can I?
How do I then prevent the deletion of a record, or fail a record submission of a certain type?

