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
mukesh guptamukesh gupta 

New Line or Line Break in Javascript Email

I need a line break in Email format . Please suggest, I have tried BR that does not working .

User-added image

Many Thanks
Mukesh
David HalesDavid Hales
Hi'
Can you try replacing
BR()

With
"<br/>"


You can leave & signs before and after BR() as it is and do retain quotes around <br/> when you replace it.
IF(ISBLANK(Years_Trading__c),"","Years Trading: " + TEXT(Years_Trading__c) +"; ") & "<br/>" & IF(ISBLANK(Turnover__c),"","Turnover: " + TEXT(Turnover__c) +"; ")


If the above suggestion worked, let us know by marking the answer as "Best Answer" right under the comment which will help the rest of the community should they have a similar issue in the future. 

Thanks & Regards 
David Hales(1044)
Kloudrac Softwares Pvt. Ltd.
Asif Ali MAsif Ali M
Hi Mukesh

Use the url encoded value for new line like below.
&p7=%0D%0A{!JSINHTMLENCODE(Case.Description)}

You can try this http://www.url-encode-decode.com/ for testing
mukesh guptamukesh gupta
David Hales and Asif,

your option dosnt working ,when i am using in  Email Format Text-Only,
User-added image
Please suggest

Thanks
Mukesh  
David HalesDavid Hales
Hi Mukesh,
I got your problem 
you can replace BR() or "</br>"  with  '\n' 

for Example :
String plainTextBody = '';
plainTextBody += 'Confirmed Late Delivery is changed to unticked \n';
plainTextBody += 'Delivered Status is changed to a value that is not Delivered Late \n';
plainTextBody += 'Late Code is changed \n';
plainTextBody += 'or Late Code Subcategory is changed \n\n';
If the above suggestion worked, let us know by marking the answer as "Best Answer" right under the comment which will help the rest of the community should they have a similar issue in the future. 

Thanks & Regards 
David Hales(1044)
Kloudrac Softwares Pvt. Ltd.