- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-27-2018 01:13 AM
Hello!
How do I include the additional comments to a notification email containing only the contents and excluding the date/time stamp and submitter?
Thank you.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-27-2018 01:36 AM
You need to depend on mail script to get this done...
Mail Script:
(function runMailScript(/* GlideRecord */ current, /* TemplatePrinter */ template,
/* Optional EmailOutbound */ email, /* Optional GlideRecord */ email_action,
/* Optional GlideRecord */ event) {
var work_notes = current.work_notes.getJournalEntry(1); //replace with element name
var regex= new RegExp('\n'); // searching for the first line break
var work_notes2=work_notes;
var i = work_notes.search(regex);
if (i>0)
{
work_notes2 = work_notes.substring(i+1, work_notes.length);
template.print(work_notes2);
}
})(current, template, email, email_action, event);
Calling mail script in notification:
${mail_script:script_name}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-16-2020 02:33 AM
if u are getting error in the above code in this line, just add, double slash
var regex= new RegExp('\\n');
it is working
thq so much....