Adding ticket Description in the mention email.
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-30-2024 12:45 AM
Hi i wanted to add in the description in the mention email at the Email script. But when i tried to put in the code to display but all it gives was undefined. but it was able to get other information.
var recordGR = new GlideRecord(current.table);
if(recordGR.get(current.document)) {
var displayValue = recordGR.getDisplayValue();
var subjectText = displayValue
? displayValue
: "a record discussion";
var tableDisplay = recordGR.getClassDisplayValue();
var linkText = displayValue
? "the " + tableDisplay + " record " + displayValue
: "this " + tableDisplay + " record ";
email.setSubject("You have been mentioned in " + subjectText);
template.print("<p>You have been mentioned by " + current.user_from.name +"</p>");
template.print("<p>description "+ current.desciption + "</p>");
template.print("<p> comments as :<p>" + recordGR.comments.getJournalEntry(1) +"</p></p>") ;
template.print("<p> in <a href='/" + recordGR.getRecordClassName() + ".do?sys_id=" + recordGR.getUniqueValue() + "'>" + linkText + "</a></p>");
}
0 REPLIES 0