What's the best way to cancel 5000 RITM tickets + Flow Execution?

MandyMaseyM
Giga Contributor

Hi everyone, our catalog form is using Flow Designer instead of Workflow when creating RITM/SCTASK tickets.

 

Now, we have 5,000+ invalid RITM tickets that we need to cancel, along with their flow executions. I just want to ask what the best way is to cancel them.

 

I was thinking of using a background script, but I think it's too risky, especially since we have to do it in the PROD instance. Can you suggest a better approach? Thank you. 🙂

1 REPLY 1

GlideFather
Tera Patron

Hi @MandyMaseyM,

 

based on the role who will perform that, you can write a fix script or Update job.

 

 

Screenshot 2026-03-26 at 21.41.39.png

 

In the update job, select the particular table, add filters how to find these 5000 records (example with short description), if not easy clustering then you can create multiple update jobs.

 

Then you can update selected fields - in my case it is adding a comment to inform about the auto-closure and changing state to Closed Incomplete.

Screenshot 2026-03-26 at 21.45.20.png

 

Then I strongly recommend to uncheck the two fields in the left-bottom corner, because closing the RITMs might and will trigger notifications and other background actions, marking this field false will not execute it, equivalent to setWorkflow(false) in the business rules.

 

The Auto-updating system fields is related to the Updated and Updated by fields, whether you want to keep the value before the mass update or if you want the mass update to be reflected here. Set true/false accordingly.

 

What is great about this approach - it is code-less so less technical users can benefit from it and most importantly it has fallback record so you can revert the changes made buuuut for reopening RITMs wouldn't be the best scenario (closing RITMs will close REQs and it is irrevertable or brings issues).

 

I am almost done, what i would suggest is to check if these 5000 RITMs have some SCTASKs associated.. because RITM is closed when all its SCTASKs are closed (if any exists). If you would only update RITM and its SCTASK would be still active, this closure might not be accepted and ServiceNow would make it invalid update. Verify this with one or two records (manually) to know this before you start.

_____
100 % GlideFather experience and 0 % generative AI