- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-18-2023 03:14 AM
Hi,
Can someone tell me how to add the comments when the request approved
Need to give the RITM that who has approved it .
Example : RITM has been approved by Adam George
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-18-2023 06:19 AM
var approver = approvalBy.name;
change this line to var approver = approvalBy.approver.name;
Please mark correct if my response has solved your query.
Cheers,
Mohammed Basheer Ahmed.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-18-2023 03:35 AM
Hi @Saib1
There is some error in scripting
modify as below
current.work_notes = "RITM is approved";
Let me know if you need more help on this as I just looked into the screenshot and modified the code.
Please mark correct if my response has solved your query.
Cheers,
Mohammed Basheer Ahmed.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-18-2023 03:39 AM
@Basheer - Here all i need is need to add who has approved in the comments .
What to do ?
Example if Adam George approve the RITM
it should come as RITM has been approved by Adam George

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-18-2023 03:45 AM
Do like this
var record = current.getUniqueValue();
var approvalBy = new GlideRecord("sysapproval_approver");
approvalBy.addQuery("document_id",record);
approvalBy.addQuery("state","approved");//Add state only if there are mulitple approvers
approvalBy.query();
if(approvalBy.next()){
var approver = approver.name
}
current.comments = "RITM approved by : " + approver;
current.work_notes = "RITM approved by : "+approver;
Please mark correct if my response has solved your query.
Cheers,
Mohammed Basheer Ahmed.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-18-2023 03:59 AM - edited 01-18-2023 04:20 AM