- 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:33 AM
Hi
Replace apprRec.setValue('comments','Approval got Autorejected as no action was taken since 7 days');
with apprRec.comments='Approval got Autorejected as no action was taken since 7 days';

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-15-2024 01:35 AM
Hi @Harsha34 ,
Can you try
apprRec.comments= "Approval got Autorejected as no action was taken since 7 days".
Thank you,
Hemanth
Certified Technical Architect (CTA), ServiceNow MVP 2024, 2025
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-15-2024 01:48 AM
Yeah I didn't see that I am setting up a value. My bad:)
Thanks anyways, can you please let me know how can i update the same comments in RITM notes?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-15-2024 01:37 AM
Replace setValue with the below