Auto-Approve via Delegate or Duplicate
Overview
These two Business Rules both run on insert/update of sysapproval_approver and automatically close out an approval record as approved when a real approval decision has already effectively been made elsewhere, so the same approver isn’t pestered twice or blocked on a delegate who already acted for them.
- Delegate Approval Check — checks the
sys_user_delegatetable for an active delegate relationship for the current approver. If that delegate has already approved the same document (matched ondocument_idorsysapproval), the current approval record is auto-approved with a work note explaining it was “No Longer Required” because the delegate already acted. - Duplicate Approval Requests — checks whether the same approver already has an
approvedrecord for the same document. If so, this (presumably duplicate) approval record is auto-approved with a work note explaining it was “Not Longer Required” due to the earlier approval on the same record by the same user.
Problem Statement
Approval workflows can generate more than one sysapproval_approver record pointing at the same underlying document for the same person — for example, if a delegate relationship is set up mid-flight, or if a workflow re-triggers approvals. Without these checks, an approver (or their delegate) could be asked to approve the same thing multiple times, or a pending approval could sit unresolved even though an equivalent approval already happened. Both rules resolve this by watching for a matching prior approved record and short-circuiting the new one to approved automatically.
| |
document_id when present and fall back to sysapproval — the two fields ServiceNow uses depending on which approval engine (legacy Workflow vs. Flow Designer) generated the record.