- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-09-2024 09:22 AM
Hi Team,
We have a system notification created which runs on updated record and when additional comment changes and we want only the latest comments to be sent and not all.
Currently its sending all the comments.
Please find below the Notification created
When to Send:
What it will contain:
If you see in the above screenshot I am using ${current.comments} but its sending all the earlier comments as well. How to fix it.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-09-2024 09:37 AM
Hi @Community Alums ,
To get the latest comments use an email script and use the below script:
var latest_comments = currrent.comments.getJournalEntry(1); // This method retrieve the latest additional comments
template.print(latest_comments);
If this solution helps you then, mark it as accepted solution ✔️ and give thumbs up 👍!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-09-2024 09:57 AM
@Community Alums ,
Just to add on, if you want to remove the name, date time from that comments then you can use the below:
current.comments.getJournalEntry(1).match(/\n.*/gm).join('').replace(/^\s*\n/gm, "");
Mark this as Helpful / Accept the Solution if this helps.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-09-2024 09:37 AM
Hi @Community Alums ,
To get the latest comments use an email script and use the below script:
var latest_comments = currrent.comments.getJournalEntry(1); // This method retrieve the latest additional comments
template.print(latest_comments);
If this solution helps you then, mark it as accepted solution ✔️ and give thumbs up 👍!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-09-2024 09:57 AM
@Community Alums ,
Just to add on, if you want to remove the name, date time from that comments then you can use the below:
current.comments.getJournalEntry(1).match(/\n.*/gm).join('').replace(/^\s*\n/gm, "");
Mark this as Helpful / Accept the Solution if this helps.