You are here:
Lock Record Action
Locks or unlocks a workflow-enabled or approval-enabled record for editing during an approval and specifies who can edit the record while it's locked.
Required Editions
In Flow Builder, add an Action element to your flow. In the New Action window, search for Lock Record, and then select Lock Record.
Set Input Values
Use values from earlier in the flow to set the inputs for the action.
| Field | Description |
|---|---|
| Action | Required. Specifies the action to perform on the record. Valid values are:
|
| Record ID | Required. The ID of the record to be locked or unlocked. |
| Allowed ID | Optional. The ID of a user, group, queue. or user role record that represents who can edit the record while it's locked. |
Usage
This action is available in flows running in API version 61.0 and later.
To lock a record, a user or credentialed Experience Cloud site visitor must have view access to the record.
To edit a locked record, an allowed user or credentialed Experience Cloud site visitor must have edit access to the record, but system admins can always edit a locked record.
If a user role is specified for the Allowed ID parameter, a user must have a user role on or above the specified user role in the role hierarchy to be able to edit the locked record.
A group or queue specified for the Allowed ID parameter must be a group or queue of users or a group or queue of or credentialed Experience Cloud site visitors. The specified group or queue can’t contain:
- roles
- roles and internal subordinates.
An attempt to lock a record that’s already locked results in an error with the UNABLE_TO_LOCK_RECORD error code.
A system admin, the user or credentialed Experience Cloud site visitor who locked a record, or someone who’s an allowed user for the locked record can unlock the record. An attempt by any other user results in an error with the INSUFFICIENT_ACCESS_OR_READ_ONLY error code.
The action completes without error when the action attempts to unlock a record that’s already unlocked.
Limitations
If a record is locked with this action and the record is submitted to a classic approval process, then the classic approval process overwrites the record lock.
- If the classic approval process overwrites the lock from this action, then the allowed users specified by this action can no longer edit the record.
- The classic approval process can be interrupted when this action unlocks a record locked by the classic approval process.

