- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-15-2024 01:14 AM
Hi @SN_Learn
I am trying to update approval comments with below script but it is not running, though the state got updated , but there is some issue in comments, I guess it is a journal field but can you please suggest how to find the backend name? I searched in XML but it shows comments.
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-15-2024 02:10 AM
Extending the code to glide RITM in your while(appRec.next())
var ritmGr = new GlideRecord('sc_req_item');
if (ritmGr.get(apprRec.sysapproval)) {
ritmGr.comments = 'Approval got Autorejected as no action was taken since 7 days';
ritmGr.update();
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-15-2024 01:46 AM
My bad, I didn't see that I am setting up a value:).
Can you please let me know how can I update the same comment in RITM notes?
I am doing it through schedule job.
Thanks

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-15-2024 02:10 AM
Extending the code to glide RITM in your while(appRec.next())
var ritmGr = new GlideRecord('sc_req_item');
if (ritmGr.get(apprRec.sysapproval)) {
ritmGr.comments = 'Approval got Autorejected as no action was taken since 7 days';
ritmGr.update();
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-15-2024 02:54 AM
I used this script in while loop after closing of if loop. It worked.
Thanks a lot!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-15-2024 03:09 AM
That's exactly where you had to do it. Glad to know it helped. 🙂