We're reclaiming inactive PDIs to keep them available for active builders. Learn what's changing, who's affected, and how to protect your work. Read More

Getting last comments on Approval record

samadam
Mega 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  ||  10x 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  ||  10x ServiceNow MVP  ||  ServiceNow Community Leader