function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
nandhini vasudevannandhini vasudevan 

Record Triggered flow builder

Hi

can anyone tell me how to throw error message in record triggered flow?

Thanks in Advance.
Best Answer chosen by nandhini vasudevan
Maharajan CMaharajan C
Hi Nandhini,

Directly we don't have any option like trigger add error method. But using Record Trigger Flow, One Custom Field, Validation Rule we can achieve this. Because the before flows will fire before the custom validation rule.

Refer the below blogs:
https://www.accidentalcodersf.com/2020/06/before-save-update-flows.html
https://www.linkedin.com/pulse/using-before-save-flow-prevent-record-creationupdate-based-gidi/

Thanks,
Maharajan.C

All Answers

ShirishaShirisha (Salesforce Developers) 
Hi Nandhini,

Greetings!

You can use the addError() method to display the error message from the flow.Please refer the sample code for the example in the below thread:

https://developer.salesforce.com/forums/?id=9060G0000005YqlQAE

Kindly mark it as best answer if it helps so that it can help others in the future.

Warm Regards,
Shirisha Pathuri
nandhini vasudevannandhini vasudevan
Hi shirisha

Can you please tell me how to throw error in flow builder(record triggered)?
Maharajan CMaharajan C
Hi Nandhini,

Directly we don't have any option like trigger add error method. But using Record Trigger Flow, One Custom Field, Validation Rule we can achieve this. Because the before flows will fire before the custom validation rule.

Refer the below blogs:
https://www.accidentalcodersf.com/2020/06/before-save-update-flows.html
https://www.linkedin.com/pulse/using-before-save-flow-prevent-record-creationupdate-based-gidi/

Thanks,
Maharajan.C
This was selected as the best answer
Ponnusamy MPonnusamy M
Hi @maharajan C, How can i set my dynmaic validation message from flow builder.