Mads Moi-Aune
Working with comments and work notes in ServiceNow
Additional comments and Work notes is of type Journal List
and therefor we can not get their value directly. So here’s how to interact with comments
and work_notes
.
(function(current) {
// Get the latest entry
var lastComment = current.comments.getJournalEntry(1);
var lastWorkNote = current.work_notes.getJournalEntry(1);
// Get all entries
var allComments = current.comments.getJournalEntry(-1);
var allWorkNotes = current.work_notes.getJournalEntry(-1);
})(current);