- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-17-2020 12:11 PM
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:
#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));
#3 But i need to show like #1 with the same format.
Please suggest how to achieve the above #3.
Thank you!!
Kumar
Solved! Go to Solution.
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-22-2020 11:57 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-17-2020 12:26 PM
Hi Dharani,
In the mail script you use you need to follow link that replaces HTML Tags & then gets it appear the way it does on the field.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-18-2020 06:49 AM
Hi Jaspal,
Tried with the below in code my mail script.
var suggComm = current.comments.getJournalEntry(1);
suggComm = suggComm.replace("[code]", "");
suggComm = suggComm.replace("[/code]", "");
suggComm = "<div><table cellpadding=\"0\" cellspacing=\"0\" style=\"table-layout:fixed\" width=\"100%\"><tbody><tr><td colspan=\"2\"><hr /></td></tr><tr style=\"\"><td class=\"tdwrap\"><strong>" + suggComm;
suggComm = suggComm.replace("(Journaled comments)", "</strong>");
suggComm = suggComm + "</span></span></p></td></tr></tbody></table></div>";
template.print("\n" + suggComm);
Comments in the incident:
Email Received:
Thank you!!
Kumar

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-18-2020 11:20 AM
Great to know it worked. Kindly close the thread by marking appropriate answer as correct so that it does not appear in unanswered list & helps future readers to find quick solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-22-2020 11:01 PM
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>'));