OOB script that closes all associated Request Items when a request (sc_request) is canceled

atul_05
Tera Contributor

Hello All,

 

Can you help me with the out of box script which marks all the associated RITM's of a REQ when the REQ is canceled.

 

Also, I am getting a error when trying to close the request. It says to close the sc_tasks first that are created in the RITM's. So when I click on cancel REQ, out of the 3 RITM's, 2 are still open because they have tasks in them and 1 RITM is getting closed as it does not have any catalog task

4 REPLIES 4

Mark Manders
Mega Patron

It works the other way around: you close the tasks and in the end the request is closed. 

Which OOB script are you talking about?


Please mark any helpful or correct solutions as such. That helps others find their solutions.
Mark

When we click on Cancel Request, it will mark all the associated RITM's as Closed Incomplete as well so there must be a OOB script which does this. I am looking for this script only which closes all the RITM's when an REQ is canceled.

Community Alums
Not applicable

Hi @atul_05 ,

 

There is a OOTB business rule which cancels the RITM's when request is cancelled.

 

Business Rule name: request closure

https://YourInstanceName.service-now.com/sys_script.do?sys_id=17c722270a04bf15014d82e183b77ba3&sysparm_view=&sysparm_domain=null&sysparm_domain_scope=null&sysparm_record_row=6&sysparm_record_rows=9&sysparm_record_list=collection%3dsc_request%5eORcollectionINsc_request%2ctask%5ecollection%3dsc_request%5eORDERBYname

 

If my answer helped you in any way, please mark it as helpful or correct.

palanikumar
Mega Sage

You can refer the below Business rules on Requested Item table:

  • Close Tasks Due to Cancellations
  • cancel flow on request cancelled/deleted

There is also another Business rule on Task table, which gets triggered as well:

  • Cancel Workflows Upon Cancellation
Thank you,
Palani