Update change record work notes with approval details of RITM

Aravind Prasann
Tera Contributor

Hi ,  I have a requirement to update the work notes of change request when the RITM is approved by "supported by, owned by and managed by of the CI" on the RITM record. Once the RITM is approved by these 3 approvals, i am creating a change record from the RITM workflow. I would like to display the RITM approval information on the change request work notes. could someone help with this ? thanks

3 REPLIES 3

Voona Rohila
Kilo Patron
Kilo Patron

Hi Aravind

you can add worknotes while creating change request.

var grSysapprovalApprover = new GlideRecord('sysapproval_approver');
grSysapprovalApprover.addEncodedQuery("sysapproval="+current.sys_id);
var notes='';
while (grSysapprovalApprover.next()) {
   notes += grSysapprovalApprover.approver.name; //modify accordingly.
}
//use notes variable and map it to your change object worknotes.
changegr.work_notes = notes;
changegr.insert();

Mark it helpful if this helps you to understand. Accept solution if this give you the answer you're looking for
Kind Regards,
Rohila V
2022-25 ServiceNow Community MVP

Thank you Rohila!

Thank you for marking my response as helpful.

If my response helped you please mark it correct to close the question so that it benefits future readers as well.

If not, please let us know if you need any other help

Regards
Rohila


Mark it helpful if this helps you to understand. Accept solution if this give you the answer you're looking for
Kind Regards,
Rohila V
2022-25 ServiceNow Community MVP