Record Rules
Lock records or fields based on field values
The Record Rules tab locks a record, or some of its fields, once a select or status field reaches a value you choose. Lock a task once it is Done, a contract once it is Signed, or a lead's source once the lead is converted.
Record rules only lock. They never make a field required: to require a field, use Configuring Fields.
Prefer video? Watch Module record rules (1:33) in the Coherence Academy. It locks contracts once they are signed.
Accessing the Record Rules Tab
- Click Modules in the sidebar to open the Module catalog
- Open your module from the catalog
- Click the Record Rules tab
Module admins can also reach it from a module's settings page: under Fields & layout, click Record rules.
Who Can Manage Rules
- Add Rule, edit, and delete are available to the Owner, Admin, Builder, and Super Admin roles, on a plan that includes the Module Builder.
- Through the API, the record-rule endpoints (
/modules/{moduleId}/record-rules) require themodule:managepermission on Modules. - The tab appears on your custom modules and on the built-in data modules the Module Builder can extend. Cases does not offer record rules.
Creating a Rule
- Click Add Rule (or Create First Rule when the module has none)
- Fill in the Create Record Rule dialog:
| Setting | Description |
|---|---|
| Name | Required, up to 100 characters. It appears in the lock banner and in error messages, so say what the rule does (e.g., "Lock Completed Tasks") |
| Description (optional) | Up to 500 characters |
| When this field... | The field that triggers the rule. Only Select, Status, and Multi-select fields are listed |
| ...equals any of these values | Check one or more of that field's options |
| Then lock... | Entire Record: all fields become read-only when the condition is met. Specific Fields: only the fields you select become read-only |
| Select fields to lock | Shown for Specific Fields. Check at least one field |
| Bypass Roles (optional) | Roles that can still edit a record or field this rule locks. Super Admin always bypasses, so it is not listed |
| Active | On by default. Turn it off to keep the rule without enforcing it |
- Click Create. An active rule applies as soon as it is saved.
If the module has no select or status field, the field list shows "No select/status fields available". Add one in the Fields tab first.
How Rules Match
A rule matches a record when its trigger field currently holds one of the rule's values:
- Capitalization and surrounding spaces are ignored. "Done", "done", and " done " all match a rule on
done. - Multi-select fields match when any selected option is one of the rule's values.
- Empty fields never match.
- Inactive rules are ignored.
Several Rules on One Module
Locks add up. If any matching rule locks the entire record, the whole record is locked. Otherwise, the fields from every matching Specific Fields rule are locked together.
Bypass Roles
- Super Admin always bypasses every rule.
- Anyone else can edit a locked record only if, for every rule that currently matches it, they hold at least one of that rule's bypass roles.
- A matching rule with no bypass roles locks everyone except Super Admin.
Bypass is all or nothing per record. Suppose a contract matches two rules: "Lock signed contracts" (Entire Record, Admin bypasses) and "Lock contract amount" (Specific Fields, no bypass roles). An Admin cannot edit that contract at all, because they cannot bypass the second rule.
Managing rules is not the same as bypassing them. An Owner or Admin who creates a rule is locked out by it too, unless their role is one of its bypass roles.
When Rules Are Enforced
Coherence checks rules on the server when an existing record is saved, so a locked record stays locked whether the edit comes from the record page, a table or board, the API, an import, or an AI agent.
Entire Record Locks
Every edit to the record is refused, including changing the trigger field back. That covers labels and types too: adding or removing a label, or setting or clearing a type, is refused on one record or on several at once. In a bulk change from the records list, one locked record refuses the whole batch before any record changes, and the error names that record.
To reopen a locked record, someone with a bypass role (or Super Admin) edits it, or a module admin turns the rule off.
Comments are still accepted on a locked record.
Specific Fields Locks
A save is refused if it includes a locked field, even when the value has not changed. Other fields on the record save normally. Labels and types are not fields, so a field lock does not stop changing them.
The Save That Triggers a Lock Succeeds
Rules are checked against the record as it was before the save. Setting a contract's status to Signed succeeds, along with any other changes in the same save, and the contract is locked from then on.
Not Checked on Create or Delete
- Creating a record is never blocked. A record created with a matching value (for example, a task created as Done) is locked from then on.
- Deleting a record is not blocked by record rules. Control who can delete with Permissions.
Error Messages
A refused save returns a 403 error naming what is locked:
| Lock | Message |
|---|---|
| Entire Record | "This record is locked by rule: Lock signed contracts" (or "rules:" followed by each name) |
| Specific Fields | "The following field is locked: Amount" (or "The following fields are locked:" followed by each field) |
What Users See
Locks are shown only to people they apply to. Someone who can bypass every matching rule sees an editable record.
- Record page, entire record locked: a "This record is locked" banner names the rule ("Locked by rule: …") and every field is read-only.
- Record page, fields locked: a "Some fields are locked" banner lists the read-only fields and the rule that locks them.
- Table views: locked cells are read-only.
- Kanban boards: a card cannot be dragged to another column when the field the board is grouped by is locked. The card shows a lock icon; hover it to see "Locked by rule: …".
Imports
- Rows that create records are not affected.
- Rows that update an existing record (the Update duplicate strategy) re-send every field of the merged record. If a rule locks any field of that record, or the whole record, for the person running the import, the row fails with the lock message and appears in the import's error list.
See Import & Export for duplicate handling.
Bulk Set Assignee
When you use Set assignee on several records, Coherence checks every selected record first. If a rule locks the assignee field, or the whole record, on any of them, the entire batch is refused before any record changes, and the error names the record.
AI Agents
AI agents are checked with the Agent role, not with the roles of the person they are working for. An agent cannot edit a locked record or field unless Agent is one of the rule's bypass roles, even when it is working for an Admin or Owner.
Managing Rules
Each rule card shows its name, its condition ("When: Status = Done"), whether it Locks Entire Record or Locks Specific Fields, the locked fields, and its bypass roles. A rule that is turned off shows a Disabled badge.
Editing a Rule
- Click the pencil icon on the rule
- Update settings in the Edit Record Rule dialog
- Click Save Changes
Disabling a Rule
Edit the rule and turn Active off. The rule stays on the tab but no longer locks anything.
Deleting a Rule
- Click the trash icon on the rule
- Click Delete to confirm. This cannot be undone.
Example Configurations
Lock Completed Tasks
The built-in Tasks module template includes this rule:
| Setting | Value |
|---|---|
| Name | Lock Completed Tasks |
| Description | Prevents editing of tasks that have been marked as done to preserve completion records. |
| When this field... | Status |
| ...equals any of these values | Done |
| Then lock... | Entire Record |
| Bypass Roles | Admin, Owner |
| Active | On |
Lock Signed Contracts
| Setting | Value |
|---|---|
| Name | Lock signed contracts |
| When this field... | Status |
| ...equals any of these values | Signed |
| Then lock... | Entire Record |
| Bypass Roles | None (only Super Admin can edit a signed contract) |
Keep a Lead's Source Once It Is Closed Out
| Setting | Value |
|---|---|
| Name | Keep lead source on closed leads |
| When this field... | Status |
| ...equals any of these values | Converted, Unqualified |
| Then lock... | Specific Fields: Lead Source, Lead Source Detail |
| Bypass Roles | Admin |
The rest of the lead stays editable, so the team can keep adding notes and changing the assignee, while source reporting stays stable.
Best Practices
- Name rules after what they lock. The name is what users see in the banner and in errors.
- Prefer field locks when only some data is final. An entire-record lock also blocks fixing a typo.
- Give rules a bypass role for corrections, unless only Super Admin should ever change a locked record.
- Add Agent as a bypass role only on purpose. Without it, AI agents cannot edit what a rule locks.
- Check imports before turning a rule on. Update imports fail on rows whose records the rule locks.
Related: Uniqueness & Duplicate Detection | Permissions | Module Builder Guide