You need to sign in to do that
Don't have an account?
Armoury
Line Break issue in Translations
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
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 LineWhen 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_FRbut 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?
You need not do any coding for this. You just have to go to 'Help Text'. Write Second Line. Now instead of hitting enter after this text, put your mouse cursor infront of the letter S and hit enter.
Let me know if you need help !!