Are there any scheduled jobs or anything that would make Request (sc_request) records inactive?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
an hour ago
We found that the state of Approval records related to Request records are being changed from requested to not_required and we thought that this may be due to the Request records being changed by the system to inactive for some reason. Upon further investigation, we have found that multiple records are affected all within a span less than a second.
There were no changes in the associated Request Item (sc_req_item) records that would've triggered the change on the Request records so I guess that rules out business rules here.
Is there any reason why the system would make multiple Request records inactive? Is it doing it through a Scheduled Job or Scheduled Flow? I have already checked both and couldn't find anything.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
an hour ago
1. Look for an out-of-the-box (OOTB) business rule named Moot Approvals Upon Cancellation on the Task table.
If a Request is set to inactive by a script or scheduled job or flow, it triggers this rule to bulk-cancel approvals within a fraction of a second and setting approval not record
2.
The 'mark closed' business rule is marking the record to inactive (active=false)
It is calling 'runMarkClosed' from the 'TaskStateUtil' script include.
The script include is checking below inactive states
SYSTEM_INACTIVE_STATES : [3, 4, 7], // task default inactive/close states
When the record is inactive, the approvals are set to 'No Longer Required'
refer: KB0726424 Approval is being set to "No Longer Required"
3. Also check this KB: KB2588470 Workflow with 'No Longer Required' Condition Approval
Link: https://<Your_instance_name>/sys_script.do?sys_id=4272fc4d0a0a0b27003f173125ab48fc&sysparm_view=&sysparm_record_target=sys_script&sysparm_record_row=1&sysparm_record_list=nameSTARTSWITHmoot%5EORDERBYname&sysparm_record_rows=1
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
an hour ago - last edited 51m ago
I figured Moot Approvals Upon Cancellation is what’s changing the state of the Approval records to not_required but what I am more concerned about is what exactly is setting the Request records to inactive (active=false) in the first place. There were no changes on the associated Request Item record that would’ve possibly triggered the changes on the Request record and also considering the fact that this happened to multiple Request Records rules out the possibility that this was due to a business rule.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
51m ago
Please explain what you have found out. What component changing the state . Is that component customized. If you share details with code, then I can clarify your query.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
36m ago - last edited 33m ago
I appreciate you looking in to this.
That’s the thing though. We don’t have a custom code of any sort that would periodically change active Request Records to inactive so it is unclear what exactly is changing the value of active flag into false and I am wondering if there is any OOTB Scheduled Jobs that would do that.
I have found a post on r/servicenow. I think it is a similar issue.
Maybe you could have a look and it will give you a clearer picture.
