Schedule Job to close Non Prod Changes 7 days after moving to Review State

nameisnani
Mega Sage

Hi Team ,

 

can anyone please help me on this requriment .

 

In change request table there is filed called ' Used For ' .

 

Where Used For is not Production - Close changes that have been in Review State for more then 7 days, then schedule a job to close these changes automatically after they have been in Rview state for 7 days

 

can anyone please help me on this requriment with steps .

 

if possible please provide screenshots for better understanding .

 

Thanks!

 

@Ankur Bawiskar 

5 REPLIES 5

Dr Atul G- LNG
Tera Patron
Tera Patron

Hi @nameisnani 

 

You can use the Flow designer. Here is basic, you can enhance it.

 

Trigger : Daily

 

Lookup records where:

  • Review state is more than 7 days

  • Used for = Non-prod

Action:

  • Update the record

  • Set state = Closed

*************************************************************************************************************
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.

Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]

****************************************************************************************************************

hi @Dr Atul G- LNG  

 

could you please if there is any error in my flow . 

 

nameisnani_0-1750055604901.png

nameisnani_1-1750055646994.png

nameisnani_2-1750055683724.png

nameisnani_3-1750055725559.png

nameisnani_4-1750055778507.png

 @Dr Atul G- LNG 

 

Please let me know if there is any error in below conditions 

nameisnani_5-1750055865947.png

 

@nameisnani 

looks good

when you tested did it not close CHG?

Also remember there might be some mandatory fields via data policy on CHG table when you move state to close

Please set those as well in Update Record flow action.

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

HI @nameisnani 

 

There is no error. Now, do one thing: try to run these conditions at the list view and see if you’re getting the changes or not. If yes, then it must work in the flow; otherwise, there is an issue with the condition.

*************************************************************************************************************
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.

Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]

****************************************************************************************************************