You need to sign in to do that
Don't have an account?
Sten Ebenau
addError() always escapes html content in SF1 and Lightning
Hi Everyone,
the addError() method which you can use in an Apex Trigger alsways escapes the error message when used in SF1 or Lightning. Has anyone experienced the same and has a solution or should we contact Salesforce with a bug report?
Thanks,
Sten
addError() message always escapes html content in browser, sf1, lightining etc. But if you use normal text it works fine.
If this answers your question mark Best Answer it as solution and then hit Like!
That is not correct. In the classic ui you can escape html content by doing addError('<a href="">Hi</a>', false); this will display the link in the error message. With SF1 & Lightning the message is always escaped.
Right, this is an issue in SF1 & lightning. You need to log a bug.
If this answers your question mark Best Answer it as solution and then hit Like!
Please note that the addError() method was never meant to render HTML, and hence it is expected behavior to escape HTML markup.
Please see the documentation here: https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_methods_system_sobject.htm#apex_System_SObject_addError
Thanks,
Shashank Srivatsavaya
Salesforce.com
Why is there an option to specify if you would like to not esacpe the error message? Also new line charachters are esacped as well. That is not HTML.
There is clearly different behaviour between SF1/Lightning and Classic.
Would you please create a known issue (https://success.salesforce.com/issues_index) for this?
Thanks a lot,
Mike