Getting last comments on Approval record

samadam
Kilo Sage

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));
}

11 REPLIES 11

@samadam 

Glad to know.

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

@samadam 

so what came in logs?

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader