only last additional comment in notification

Goran WitchDoc
ServiceNow Employee
ServiceNow Employee

Hi,

Im working on the mail-notifications   to caller when the assignee write something in the "Addition comments"-field. My problem is that when I use the ${comments} it takes all additional comments, both the one I typed and the ones that is typed in before. I just want the last addition comment to go out in the mail to the caller.

How do I do that? 😃

1 ACCEPTED SOLUTION

palmen
Tera Guru

There is a System Property for this if you wan't to set it default in your instance.



System Properties -> Email


Number of journal entries (Additional comments, Work notes, etc.) included in email notifications (-1 means all).


View solution in original post

7 REPLIES 7

Kalaiarasan Pus
Giga Sage

current.comments.getJournalEntry(1);


Anurag Tripathi
Mega Patron
Mega Patron

You might be using ${comments}   dicectly in the email notification body....but to use current.comments.getJournalEntry(1); you will have to use mail_script and use a query to get the latest comment.


-Anurag

Thanks for the information..



Giving a shoot as a new guy, can I throw in something like this:



<mail_script>


template.print(current.comments.getJournalEntry(1));


</mail_script>



It feels abit to easy, but I'll give it a shoot 😃


Yup that is correct Should work well...