- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Wednesday
Hi,
I am trying to print the last comment/worknotes in a notification using email script:
pls check this
[/code]Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thursday
Hi @gazalagrawa,
This behavior is commonly seen with CSM Configurable Workspace, where journal entries may be stored with formatting markers such as [code] and [/code].
Since getJournalEntry(1) returns the raw journal content, those tags are included in the output.
You can remove them before printing:
var comment = current.comments.getJournalEntry(1);
comment = comment.replace(/\[code\]|\[\/code\]/g, '');
template.print('Comments: ' + comment);
If you need only the actual comment text (without timestamps, usernames, or formatting), query the sys_journal_field table and use the value field instead of getJournalEntry().