Formatting Journal entry into table
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-16-2022 09:59 PM
Hey Community,
Is there any way to format work notes into a table in the email notification body? I was trying through the email script but didn't get it.
I have to fetch the only Journal entry which contains an "email address". When I tried to display this I'm getting this as a single-line text.
Any suggestions on this?
The following is the Journal entry image:
- Labels:
-
Incident Management
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-17-2022 10:13 AM
Hey there!
I wrote an article (and free tool) on how to get Journal entries from a given record and (optionally, depending on how you call the function in the article) parse and convert/sanitize the contents of each entry for HTML.
For example, by calling the function in the article, in the following way, in a Notification Mail Script, you can get all journal entries formatted as HTML:
var arrCommentsAndWorknotes = getJournalEntries(
current,
'comments_and_work_notes',
false,
false,
-1 //Get ALL journal entries
);
There's also some code near the bottom of the article that'll convert the result into an HTML table for you as well. 🙂
The article is at https://go.snc.guru/journal.
(Note: You can now create your own short-URLs using https://go.snc.guru/short!)
And don't forget - If you found this helpful, please click to mark it as helpful. It really helps out! 🙂