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
trmptrmp 

Formula field with BR and Email gives invalid HTML

This is more of an FYI in case anyone comes across this. I have logged a case with Salesforce Support on this issue.

 

If you create a formula field in Salesforce that includes

BR() & Email

 for any email field, Salesforce will produce invalid HTML. Specifically, a br tag will be inserted into the mailto link tag.

 

Work around: Include some whitespace or text between the BR and the Email field, like so

BR() & " " & Email

 Hope this helps someone!

Best Answer chosen by Admin (Salesforce Developers) 
trmptrmp

Salesforce support has also provided a solution:

 

BR() & HYPERLINK("mailto:" & Email , Email )