Salesforce Dictionary - Free Salesforce GlossarySalesforce Dictionary
All errors
Validation

ENTITY_IS_LOCKED: entity is locked for approval

The record is currently in an Approval Process and is locked for editing until the approval is granted, rejected, or recalled. The lock is enforced at the record level — even an admin can't edit without unlocking first.

Also seen asENTITY_IS_LOCKED·entity is locked for approval·ENTITY_IS_LOCKED: entity is locked·record locked approval

Salesforce's Approval Processes lock records during approval to prevent edits that would invalidate the approval state. The lock applies to all users by default, including the record owner.

What's locked, exactly

When a record enters an active approval step:

  • The record's editable fields become read-only
  • Most fields can't be changed via DML or UI
  • The lock holds until the approval is approved, rejected, or recalled

How to unlock

Option 1: Wait or finish the approval

The intended path: someone approves, rejects, or recalls. The lock auto-releases. From the record page, the approver clicks the action; the platform updates the record.

Option 2: Unlock for editing (admin)

Setup → Process Automation Settings"Enable record locking and unlocking in the Lightning Experience" must be on. Then admins can click "Unlock" on the record's approval section.

Option 3: Apex unlock

For programmatic unlock:

Approval.UnlockResult result = Approval.unlock(recordId);
if (result.isSuccess()) {
    // record is now editable; do your DML
}

This works only if the running user has the right permission (Modify All on the object, or admin).

Option 4: Allow record owners + admins to edit during approval

In the Approval Process settings itself, there's a checkbox: "Allow submitters to edit records during the approval process." If checked, the owner and admins can edit while in approval. Other users still see the lock.

When the lock survives an approval action

If the approval workflow has multiple steps and the first step approved, the record is unlocked briefly, then re-locked for step 2. So you may see this error fluctuate as approval progresses.

A common scenario: integrations losing edits

A nightly sync integration often updates records — but if some of those records are mid-approval, those updates fail with ENTITY_IS_LOCKED. The integration should:

  1. Detect the lock-related error and skip
  2. Log the record ID for retry the next day
  3. Or, if the integration must succeed, use Approval.unlock from a service account with elevated permissions

The cleanest pattern: design the integration to not update locked records (skip + retry), rather than forcing through the lock. Forcing through approval locks is auditable and can break compliance workflows that the lock exists to enforce.

Different from row-locking

Don't confuse this with the optimistic-concurrency error: UNABLE_TO_LOCK_ROW. That one is transient (another user is editing the same row right now). ENTITY_IS_LOCKED is durable (the approval process is holding the lock).

Related dictionary terms