How do I display the DML error message produced by Salesforce when using the on-error Action?

I’m running multiple actions, when saving and there is an error the resulting error message is not showing where I want it to. I would like to display the message in the message UI instead.

When I use the Add on-error Action functionality I can display a static message no problem, but what Global Merge Variable etc… do I need to use in order to display the error message provided from Salesforce?

Hi Joseph,
I have had success using the merge syntax: {{messages.0.message}} in an On-error action to capture error messages returned by Salesforce.

3 Likes

Elena you are spot on. That worked perfectly.

2 Likes