ENTITY_IS_LOCKED: meaning and how to fix it

Data and DML Checked against the official docs on Source: SOAP API Developer Guide: Core Data Types, StatusCode

Quick answer

ENTITY_IS_LOCKED: The record is locked because an approval process is pending on it, so it cannot be edited until the approval finishes. Start with: Open the record and check for a pending approval request.

Typical message: ENTITY_IS_LOCKED, entity is locked

Cause

The record is locked because an approval process is pending on it, so it cannot be edited until the approval finishes.

How to fix ENTITY_IS_LOCKED

  1. Open the record and check for a pending approval request.
  2. Ask the approver to approve or reject it, or have an admin recall or unlock it.
  3. In automation, check Approval.isLocked or the lock status before updating.

Have a different message? Paste it into the error decoder, which matches it against 45 common Salesforce errors in your browser.

Frequently asked questions

What does ENTITY_IS_LOCKED mean in Salesforce?

The record is locked because an approval process is pending on it, so it cannot be edited until the approval finishes.

How do I fix ENTITY_IS_LOCKED?

1. Open the record and check for a pending approval request. 2. Ask the approver to approve or reject it, or have an admin recall or unlock it. 3. In automation, check Approval.isLocked or the lock status before updating.

More Data and DML errors

SFDX Talk is unofficial documentation. It is not affiliated with, endorsed by, or sponsored by Salesforce, Inc. Message text varies slightly by release and context, so confirm against the official page before relying on it.