Getting last comments on Approval record
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-14-2025 12:20 PM
I am trying to get the last comments on approval from workflow notification and using the following. It is showing empty. Any idea?
var gr1 = new GlideRecord("sysapproval_approver");
gr1.addQuery("sysapproval", current.sys_id);
gr1.query();
if (gr1.next()) {
template.print('Notes: ' + gr1.comments.getJournalEntry(1));
}

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-14-2025 04:59 PM
@samadam Can you try the following.
var gr1 = new GlideRecord("sysapproval_approver");
gr1.addQuery("sysapproval", current.getValue('sys_id'));
gr1.query();
if (gr1.next()) {
template.print('Notes: ' + gr1.comments.getJournalEntry(1));
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-14-2025 05:31 PM
The code prints "Notes" showing that query works but does not get the value for comments.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-14-2025 06:58 PM
@samadam Did you check if the record actually had any comment on it?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-14-2025 07:06 PM
Yes, I added myself and I can see it in the activity log.