Approvals widget showing 'Loading approvals...' message


Description

When using the OOB approvals widget, it shows 'Loading approvals' message and the approvals don't load even for admin user

Release or Environment

All

Cause

Invalid document_id field reference in sysapproval_approver table. When loading approvals, in the widget logic we check if the user has the read access to the record which they are approving. If the document field in the approval record, which should be referencing the approving record is invalid, the approvals don't load. This can happen when the referenced document record no longer exists in the instance

Resolution

Make sure that the invalid approval records are deleted or correct reference to the document is present