The CreatorCon Call for Content is officially open! Get started here.

Incident Comments Format Issue

dharanikumar
Giga Guru

Hi Team,

When i add the additional comments in the incident. Then a notification will be triggered to the Caller and Assigned To.

#1 Additional Comments will be looking something like below in the incident:

find_real_file.png

#2 But in the email it is looking like below and it is not carrying any spaces or paragraph breaks or it is not carrying over the line returns etc.. This is not a good user experience and its confusing for them.

We are just getting the latest comment and printing using the email scripts.

template.print(current.comments.getJournalEntry(1));

find_real_file.png

#3 But i need to show like #1 with the same format.

Please suggest how to achieve the above #3.

Thank you!!

Kumar

1 ACCEPTED SOLUTION

Nikhil Bahurup1
Tera Expert

Hi,

Did you try this?

try replacing the newlines with html <br> tag as below. This should indent the text properly as per your requirement.

template.print(current.comments.getJournalEntry(1).replace(/(?:\r\n|\r|\n)/g, '<br>'));

 

View solution in original post

8 REPLIES 8

Nikhil Bahurup1
Tera Expert

Hi,

try replacing the newlines with html <br> tag as below. This should indent the text properly as per your requirement.

template.print(current.comments.getJournalEntry(1).replace(/(?:\r\n|\r|\n)/g, '<br>'));

Hi Dharanikumar,

Please let me know if this issue is resolved. Also please mark my answer correct/helpful if it helped in resolution of your issue.

Nikhil Bahurup1
Tera Expert

Hi,

Did you try this?

try replacing the newlines with html <br> tag as below. This should indent the text properly as per your requirement.

template.print(current.comments.getJournalEntry(1).replace(/(?:\r\n|\r|\n)/g, '<br>'));

 

Thanks Nikhil !!