New answers tagged

0

I have run into the "oppossite" scenario to these multiple times (= how a rich text field sent over an email in Salesforce appears with double spacing), and it's confusing mainly because the text in the Salesforce UI (at least in Lightning Experience) looks different (nice, i.e. without extra spacing) than when that same text is sent over email ...


1

The \ character is an escape character in Apex. If you wanted it to be a literal backslash in the resulting string, you'd have to double up on it: \\. However, this won't work the way you expect, as the characters need to be escaped in HTML. Use escapeHtml4() to do this: newArticle.Article_Body_Long_T__c = result.SolutionNote.escapeHtml4(); Or, to ...


1

To retain the formatted value of long text area while coping to the rich-text area, You need to replace all the carriage returns with br's as rich text area accepts HTML instead of a string. I did something like this and it worked:- Account__c acc= [SELECT Id, Name, Long_Text__c, Rich_Text__c FROM Account__c where id='a0WB0000000WrLUMA0']; acc.Rich_Text__c = ...


Top 50 recent answers are included