You need to sign in to do that
Don't have an account?
Sarita Pa 3
Retrieve Error message From PlatForm Events
Hi All,
Good Morning.
I am trying to get the error message when i am using the below scenario
Here is Flow
Update Opp from UI --> (Invokes) BeforeOppUpdate.trigger --> (Publish message) PlatForm Event --> (Subscriber) Flow.
Trigger is getting saved successfully even if there is an error in 'Flow'.
Is there any way that i can catch the error in trigger and stop execution of trigger if flow throws an error.
Thank you very much for your quick response.
Messages for platform event aren’t published for autolaunched flows or processes and Apex Triggers aren't supported.
https://developer.salesforce.com/docs/atlas.en-us.platform_events.meta/platform_events/sforce_api_objects_flowexecutionerrorevent.htm
Try to use {!$Flow.FaultMessage} that captures the error message of the flow.
https://help.salesforce.com/articleView?id=flow_ref_resources_system_variables.htm
https://help.salesforce.com/articleView?id=flow_build_logic_fault_examples.htm&type=5
Hope above information was helpful.
Please mark as Best Answer so that it can help others in the future.
Thanks,
Vinay Kumar