• Jacky Decoster
  • NEWBIE
  • 0 Points
  • Member since 2016

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 1
    Replies
Hello,

I created a custom field and set the help text with the line breaks and when it is hovered in the detail page it displays as 
First Line
Second Line
When I checked the html page generated by Salesforce the code looks like below.
sfdcPage.setHelp('xxxx', 'FirstLine\r\u003Cbr\u003ESecondLine');
which i assume is complicated version of 
sfdcPage.setHelp('xxxx', 'FirstLine\r\nSecondLine');
Now when I added a translated text in Setup -> Translation Workbench -> Translate for another language and given the value as 
First Line_FR\r\nSecond Line_FR
but in the UI, it displays everything in a single line and there is no line break but instead it displays all the characters entered above. When looked at the html page generated by Salesforce this is what I see
sfdcPage.setHelp('xxxx', 'First line_FR \\r\\n Second line_FR');
SF automatically inserts another escape sequence character '\' so that it displays what we enter in the translated text. I tried replacing '\r\n' with the actual value which SF used '\r\u003Cbr\u003E' in the translation workbench but still no luck. Is there any other way to display the line break?