Last 3 comments and work notes are appearing in the email notification instead of only last comment.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-20-2022 02:55 AM
Hi all,
Additional comments and work notes are updating last 3 messages in the email notification instead of last one.
We have issue with the only one instance but the same development is available in the both instances(Test & other non- prod environment)
For example: if user commented in the incident like Test-1 initially and later Test-2 both the comments are showing where ever comments field used in the email notifications.
What exactly to be checked to rule out the issue?
Thanks,
Ksnow
- Labels:
-
Scripting and Coding

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-20-2022 03:10 AM
Hi Ksnow,
You have to use mail script for this, In notification add this line of code : ${mail_script:getLastComment}
then create email script and add this line of code:
template.print(current.comments.getJournalEntry(1));
Regards,
Musab
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-09-2023 03:59 AM
Hello,
After the upgrade, one property changed value from 1 to 3
To solve this its OK to change change back from 3 to 1
Hope this helps.
/Petr
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-20-2022 03:17 AM
Hi,
So are you saying the same notification is behaving differently in both the instances?
can you share what configuration/script you are using?
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-20-2022 03:35 AM
Hi Ankur,
Yes same notification is behaving differently in both the instances.
There is no script, this is the email notification.
In all notification where ever we are using "Comments" for all those notification it showing like below. Highlighted in yellow are the comments