- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-09-2019 04:07 AM
Hi,
can you help me how to copy Approval comments into RITM, REQ, when RITM was REJECTED.
Not Working
here Approvals comments copying to RITM, but Not copied into REQ.
approvalcomments();
function approvalcomments()
{
var grr = new GlideRecord('sc_req_item');
grr.get(current.sysapproval);
grr.comments = current.comments;
grr.update();
var gr = new GlideRecord('sc_request');
gr.get(gr.request);
if(gr.next())
{
gr.comments = current.comments+" " +gr.number;
gr.update();
}
}
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-09-2019 05:20 AM
Working example from my PDI (= tested). Working for Approvals on RITM.
If my answer helped you in any way, please then mark it as helpful.
Kind regards,
Mark
---
Kind regards,
Mark Roethof
Independent ServiceNow Consultant
10x ServiceNow MVP
---
~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-09-2019 04:11 AM
Do you mean all approval comments or just comments from the approval record that was rejected?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-09-2019 04:14 AM
here Approvals comments copying to RITM, but Not copied into REQ.
approvalcomments();
function approvalcomments()
{
var grr = new GlideRecord('sc_req_item');
grr.get(current.sysapproval);
grr.comments = current.comments;
grr.update();
var gr = new GlideRecord('sc_request');
gr.get(gr.request);
if(gr.next())
{
gr.comments = current.comments+" " +gr.number;
gr.update();
}
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-09-2019 04:13 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-09-2019 04:15 AM
here Approvals comments copying to RITM, but Not copied into REQ.
approvalcomments();
function approvalcomments()
{
var grr = new GlideRecord('sc_req_item');
grr.get(current.sysapproval);
grr.comments = current.comments;
grr.update();
var gr = new GlideRecord('sc_request');
gr.get(gr.request);
if(gr.next())
{
gr.comments = current.comments+" " +gr.number;
gr.update();
}
}