On a standard instance, individual approval requests are stored in a table named sysapproval_approver. Each row is one request to one approver about one record, with a state such as requested, approved or rejected. The name “sys_approval” is often used loosely for this table. Confirm the name in your own dictionary.
Which table people mean by “sys approval”
The phrase “sys approval table” is a loose label. The table most people need is sysapproval_approver.
The name trips people up because many system tables start with sys_ and an underscore, while this one starts with sysapproval and has no underscore after sys. If you search your table names for sys_approval, search for “approval” instead and read what your instance returns. Run that search on your instance to see exactly what it has. Release and plugin differences can add or rename related tables, so treat the list on your instance as the answer.
What a row in sysapproval_approver represents
One row means: “this person has been asked to approve that record.” If a change request needs three people to sign off, expect three rows pointing at the same change, one per approver. That one-row-per-person shape is the thing to hold in your head, because reports and scripts you write have to cope with it.
Each row records who is being asked, which record they are deciding on, and the decision status of that one request, for example requested, approved or rejected. The approver and the record being approved are the two pointers that matter most, because together they tie each request back to the thing a person is deciding on.
Column names and any extra columns differ a little between releases, so confirm them in the dictionary view of the table, including the exact name of the pointer back to the approved record, before you write a script against them.
How rows get created
Rows reach this table by a few routes, and knowing which route made a row explains a lot of the odd behaviour you may see.
- Flow Designer and Workflow Studio. The Ask for Approval action creates the approval records for the flow, waits for decisions, and then continues based on the outcome. The rules inside that action (anyone approves, all users approve, a count or a percentage of users approving) decide when the flow moves on.
- Manual addition. Someone adds an approver by hand from the record. A row added by hand may be missing values that automated routes fill, so compare it with a complete row.
- Scripts and integrations. A script or REST call inserts a row directly. You then own every value on the row.
When you inherit an instance, a useful habit is to sample a handful of rows from each route and compare them side by side. Rows made by the flow route show what a complete row looks like on your release, and any manual or scripted row that differs from them is a candidate for repair.
How approval state flows back to the record
The approval row and the record being approved are two separate things, and they are tied together by logic, not by a database constraint. On task-based records, there is an Approval field on the record itself that holds the results of those requests. Something has to move that value when the rows change. Usually that is the workflow or flow that requested the approval.
The practical consequence: if you change an approval row’s state with a script and the parent record does not move, nothing told the parent record about the change. Changing state through a direct database-style update, or with a setting that skips business rules, can leave the two out of step. Check on your instance and release how the parent value is updated before you rely on it, and test with a throwaway record.
Read the record back after any write. Success from an API or script tells you the request was accepted, not that the state you wanted is now stored on both the approval and the parent.
Querying the table
You can work with the table in two ways without code, and a third with it.
List filters and reports. Open the list for the table you found (the same route described above), then filter on a state of Requested and on the approver you care about. Group a report by State to see where approvals pile up.
Scripts. In a server-side script, a GlideRecord query on the table works like any other. The shape is: create the record object for sysapproval_approver, add a query for approvals whose state is requested, then iterate. When you need the approvals for one record, filter on the record being approved by its sys_id rather than matching on display numbers, since numbers are for people and sys_ids are for code.
Keep scripts that touch this table in a scoped place where you can test them, and prefer reading over writing. Rewriting approval rows by script skips the human decision the process was built to capture, which is an audit problem before it is a technical one.
Before changing anything, write the question you are trying to answer in one sentence, such as which requests are still waiting on a given person. That sentence decides whether you need a list filter, a report or a script, and it keeps you from reaching for code when a saved list would do. It also gives a reviewer something to check your work against.
Troubleshooting the usual problems
An approver says they never received the request. Look for their row. If it exists with state requested, the data is fine and the problem is notification or the approver’s list view. If no row exists, the process that should have created it did not run, or it ran for a different user.
The approval is approved but the record is stuck. Check whether the parent record’s Approval value changed. If the row says approved and the record still says requested, look at the workflow or flow that was waiting on the decision.
Approvers who cannot see the request. Access to the table is governed by access controls, which vary by instance and release. Check the roles required on the table and on its fields before assuming data is missing.
When you hand a fix to someone else, include the steps you took to confirm it, not only the result. A short note covering which record you tested on, what you expected and what you saw lets the next person repeat the check on their own copy.
Habits that keep approval data trustworthy
Trouble with approval data usually traces back to rows added outside the normal route, so the habits below are largely about process rather than technique.
A few habits help prevent these cases:
- Decide who owns the table. One named owner for approval data, even if that person only reviews scripts, stops three teams from each adding their own fix.
- Test in a non-production instance first. Approvals touch real decisions. Rehearse any script or bulk change on a copy and read the results back before running it live.
- Prefer the standard route. If a process can use a workflow activity or a flow action, use it instead of inserting rows by hand.
- Review changes together. Ask a second person to read any script that writes to approval rows, because the mistakes are quiet: nothing errors, the data is simply wrong.
- Compare before you correct. When a manually added row behaves differently from a normal one, set the two side by side and fix whatever differs instead of adding another row on top.
- Write down what you learned. When you confirm a field name or behaviour on your release, note it for the next person.
Frequently asked questions
Is there really a table called sys_approval?
On the usual setup, the approval requests table is sysapproval_approver, with no underscore after sys. Search your instance’s table names for “approval” to see what it has.
Can I change an approval state with a script?
You can write to the field, but the parent record may not follow, and you would be recording a decision the approver did not make. Read the record back after any write and prefer the normal approval path.
How do I find all pending approvals for one person?
Open the table’s list and filter on a state of Requested and on that user as the approver. Group the report by State if you also want to see the other decisions.
Does every approval have a matching workflow or flow?
Not necessarily. Manual and scripted rows exist with nothing waiting on them, which is one reason a decision on such a row may not move anything.