OOB script that closes all associated Request Items when a request (sc_request) is canceled
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-28-2024 06:04 AM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-28-2024 06:24 AM
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?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-28-2024 06:33 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-28-2024 06:42 AM
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-28-2024 06:44 AM
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