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
sssssssssssssssssssssss ssssssssssssssssssssssss s 

can we call addError from Process Builder?

Hi Team,

Can we call an apex class with addError method from process builder to display custom error message when any specific error occurs in process builder?
ApuroopApuroop
I tried a little bit but no luck. I don't think it's possible. Good luck and let us know if you find anything. :)

Here's a few links you can refer to: 
https://developer.salesforce.com/forums/?id=906F00000005FUoIAM
https://salesforce.stackexchange.com/questions/95034/apex-class-to-handle-flow-process-errors-from-validation-rules-invocable-method
 
Ajay K DubediAjay K Dubedi
Hi,

I hope you are doing well Found an old answer to your question...
try this
https://developer.salesforce.com/forums/?id=906F0000000D8tTIAS

You can also follow these link for more help:
https://releasenotes.docs.salesforce.com/en-us/summer18/release-notes/rn_forcecom_flow_run_error_ui.htm
https://developer.salesforce.com/docs/atlas.en-us.salesforce_vpm_guide.meta/salesforce_vpm_guide/vpm_designer_elements_connector_fault_usermsg.htm

I hope you find the above solution helpful. If it does, please mark as Best Answer to help others too.

Thanks,
Ajay Dubedi