I have a trigger that fires for an object before insert/update to validate that a date range entered does not overlap any existing records. That appears to be working OK after a bit of work.
I have now added a Flow to enable the users to input the data for a new record from their lightning homepage. That works well except that when the record create runs it appears to fire the trigger which if the dates overlap and an error is returned the flow returns an unfriendly error:
This error occurred when the flow tried to create records: FIELD_CUSTOM_VALIDATION_EXCEPTION: You can not book these dates as they overlap existing records. For details, see API Exceptions.:
I can't find a way to capture the error in the flow so a user friendly one can be presented instead. The only thing I can think of is to put the trigger code in a class and use the class in the flow, would require changing the code.
Any ideas or better ways?