Default Error handler before delete

1
I have an entity with a before delete microflow. I've set this to "Raise an error" if this returns false. Now I wish to return a custom message instead of the default error handler to be displayed. I've set a custom error handler with rollback. But this not seem to stop the default error handler from showing. How can i make it so that only my own validation message shows?
asked
1 answers
3

What you probably want to do is configure the error handler for your delete action rather than in the event handler. This would require handling all your delete behavior with microflows but should allow you to accomplish what you're describing.

I've included a quick draft of what this might look like below.

Your new delete microflow: https://modelshare.mendix.com/models/5c1be2fa-0712-46b2-8ba7-93f4646e6941/beforedeletecustomerrorhandling1

The before delete event handler: https://modelshare.mendix.com/models/65b5d8cf-bdde-4d92-af17-b463327cf828/bd

This set-up will only trigger the custom error message configured in the before delete, not the standard runtime exception.

Edit: added model shares for clarity.

answered