- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-10-2017 06:36 AM
I am looking for a way to change the existing mail_script API ${mail_script:ng_activity_mention_body} to display the @Mentions from work notes, instead of just the link to view messages in an incident.
-Thx!
Solved! Go to Solution.
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-12-2017 10:55 AM
See in bold below how we edited the ng_activity_mention_body to accomplish this. We also edited the subject of the emails above.
var recordGR = new GlideRecord(current.table);
if(recordGR.get(current.document)) {
email.setSubject("You have been mentioned in " + recordGR.number +" | " + recordGR.getDisplayValue());
template.print("<p style='color: #424E5B;margin: 0 0 12px;line-height: 26px;margin-bottom: 12px'>You have been mentioned by " + current.user_from.name + " in <a href='/" + recordGR.getRecordClassName() + ".do?sys_id=" + recordGR.getUniqueValue() + "'>" + recordGR.getDisplayValue() + "</a></p>");
if (current.field_name == "comments") {
template.print(recordGR.comments.getJournalEntry(1) + "<br />");
}
else if (current.field_name == "work_notes") {
template.print(recordGR.work_notes.getJournalEntry(1) + "<br />");
}
}
Code thanks to Mike Kaufman!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-31-2022 07:33 AM
laurac, can you please help me understand the purpose of displaying both the number and the display value in the subject line ? Thanks.