Is there any way to get "Approval Comments" to go to a SC Task

Wendy Peterson
Giga Guru

Is there anyway I can get "Approval Comments" to show up in the "SC Task"? So it goes to the support group. Approvers might change a role for someone and they comment there and they are getting missed cause they don't go to the task... TIA

13 REPLIES 13

That works Fabulous for putting the names out there but for some reason none of the comments go in that field it just shows with no comments. I added a PUBLIC ACL to sysapprover.comments field but that didn't seem to do anything. So it seen that both Scott and Mary added an note to it or it wouldn't have put their names on there? It didn't add the guy that went to Not Requested when Scott approved it.

Approval Comments: from Scott Hannah

Approval Comments: from Mary Nadeau

I did a search on the SYS ID see screenshot and it shows up. The comments is a Journal Field that shows up only on the approval record. So i must have some security wrong or something?

I attached a SS on how that dictionary entry looks. Do i need to check the Display box?


Comments is a journal field. as such you need to tell it what you want all of them or some of them.
Link to wiki about accessing these journal field values: http://wiki.servicenow.com/index.php?title=Using_Journal_Fields#Getting_the_Contents_of_a_Journal_Field_into_an_Array


I tried this on https://demo008.service-now.com as the TEST Catalog Item under Request for Application but that one didn't work either wonder if you have something special set up?


Wendy Peterson
Giga Guru

Thanks for all the help guys... I got this working by doing a little bit of both..

var apv = new GlideRecord('sysapproval_approver');
apv.addQuery('sysapproval',current.sys_id);
apv.addQuery('comments','!=','') // add this to only find approvals that have comments on them
apv.query();

while (apv.next()) { // change if to while so it will go through all approvals with comments
task.description += "\nApproval Comments: from " + apv.approver.name + "\n" + apv.comments.getJournalEntry(-1); // add approver name here
}


Thank you for this solution. I used this with little modification to work in the approval approved or rejected emails send to the Requested For.