- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-06-2023 08:00 AM
Hello All,
I have a requirement to close out all the RITMs from a given list and the corresponding requests should also be set to the states and stages given in requirement
The requestor has to be notified with a close code comments stating " Your approval is rejected as it is long pending with the approver".
Below code is updating states and stages but comments is not getting updated.
@Anurag Tripathi Please advise.
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-06-2023 11:14 AM
Hi @Swetham ,
Would you try dot walking update instead set value.
//closeRITM.setValue('work_notes',"Request is rejected following the three-strike principle, when pending approval for long time.");
//closeRITM.setValue('comments',"Request is rejected following the three-strike principle, when pending approval for long time.");
//try below
closeRITM.comments = "Request is rejected following the three-strike principle, when pending approval for long time.";
closeRITM.work_notes="Request is rejected following the three-strike principle, when pending approval for long time."
closeRITM.setValue('state',4);
tried in my PDI seems to be working
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
09-06-2023 11:14 AM
Hi @Swetham ,
Would you try dot walking update instead set value.
//closeRITM.setValue('work_notes',"Request is rejected following the three-strike principle, when pending approval for long time.");
//closeRITM.setValue('comments',"Request is rejected following the three-strike principle, when pending approval for long time.");
//try below
closeRITM.comments = "Request is rejected following the three-strike principle, when pending approval for long time.";
closeRITM.work_notes="Request is rejected following the three-strike principle, when pending approval for long time."
closeRITM.setValue('state',4);
tried in my PDI seems to be working
Thank you,
Hemanth
Certified Technical Architect (CTA), ServiceNow MVP 2024, 2025