Find your people. Pick a challenge. Ship something real. The CreatorCon Hackathon is coming to the Community Pavilion for one epic night. Every skill level, every role welcome. Join us on May 5th and learn more here.

Inserting just the last 'Additional comment' into e-mail notifications?

jas101
Tera Expert

Hi guys,

 

Can someone please shed light on the best way to insert the most recent 'Additional comment' into a e-mail notification.

 

We have just inserted ${comments} in our 'Incident commented' e-mail notification as there was a request for users to see updates made to records via inbound e-mail replies - however now all e-mail replies within the ticket are showing in the e-mail notification which is making it unnecessarily long.

 

This has just reminded me of another issue with notifications - confidentiality/privacy notices at the bottom of e-mails! Is there an easy way to strip these out so they are not placed into the record?

 

Cheers in advance,

Daniel

1 ACCEPTED SOLUTION

marcguy
ServiceNow Employee

System property:


Using Journal Fields - ServiceNow Wiki



or for only selected:


GlideElement - ServiceNow Wiki



current.comments.getJournalEntry(1); //get last comment


View solution in original post

9 REPLIES 9

marcguy
ServiceNow Employee

System property:


Using Journal Fields - ServiceNow Wiki



or for only selected:


GlideElement - ServiceNow Wiki



current.comments.getJournalEntry(1); //get last comment


Anurag Tripathi
Mega Patron

This should help



var notes = current.comments.getJournalEntry(<number of records that you want to fetch>);



to fetch all the records use -1.


-Anurag

Thanks Anurag.



Are you able to help with the query on stripping out the e-mail confidentiality notices at all?



Cheers,
Daniel


marcguy
ServiceNow Employee

there is another email property:


Discard everything below this text if found in a reply body (comma separated, case sensitive)


\n\n-----Original Message-----,\n\n   _____   \n\nFrom:


it's normally filled with these characters out of the box, but you can add/modify if something is specific to your company: