- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-09-2014 08:24 AM
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
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-09-2014 08:33 AM
System property:
Using Journal Fields - ServiceNow Wiki
or for only selected:
GlideElement - ServiceNow Wiki
current.comments.getJournalEntry(1); //get last comment
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-09-2014 09:20 AM
Thanks but having tested with: \n\n-----Original Message-----,\n\n _____ \n\n From:
I'm now expecting SN to ignore everything other than the text in my e-mail reply but it is not still.
A standard header looks like like this so why isn't everything below 'From:' being discarded?
From: Singer, Daniel
Sent: 09 September 2014 15:35
To: 'IT Service Desk - DEV'
Subject: RE: INC0204111 -- comments added to New incident
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-09-2014 08:54 AM
Hi Daniel,
can you elaborate a little?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-09-2014 09:22 AM
When a user replies to a notification sent via SN, this reply will be entered into the record under 'Additional comments'.
However what is also included is the e-mail disclaimer/confidentiality notice etc. on that e-mail reply which does not need to go in to the record (it just clogs the Activity history section up unnecessarily).
I am trying to stop this from going into the record - ideally it would only be the text in the e-mail reply that goes into the record and nothing else.
Thanks,
Daniel
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-09-2014 09:37 AM
Hi Daniel,
I can suggest you to do the string operations as below.
var str=email.body_text;
var count=str.indexOf('From:');
var str_text=str.substring(0,count-1);
then you can update the additional comments with str_text.
Let me know if it works.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-08-2025 06:57 AM
Try ${comments:1} or ${comments:2} or ...