Request is still active even when the RITMs are closed
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-15-2025 04:09 AM
I want to close the active requests for which the RITMs are closed, complete or incomplete, using the background script. Can anyone please help me with the script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-15-2025 05:35 AM
seems there might be issue with the active flag during REQ query
try this in query
grRequest.addEncodedQuery('stateIN-5,1,2');
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-15-2025 05:40 AM
@Ankur Bawiskar Using the below script, even though it is not working
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-15-2025 05:42 AM
seems some of your RITMs might be in Open, Pending or Work In progress
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-15-2025 05:53 AM
@Ankur Bawiskar that's what my requirement is, some ritms are closed complete and the same request is still active even when the RITM is closed complete.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-15-2025 05:58 AM
so my script will close the REQs for which all RITMs are closed
If any 1 RITM under that active REQ is not closed it won't close the REQ
Script I shared will solve your requirement.
I am not getting what's not working as per my script.
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader