States and rules
What it is
Section titled “What it is”A collection’s rules control which changes are valid:
- States: a list field with allowed transitions (Draft → Sent → Accepted). Changing to a state without a transition is rejected.
- Validations: conditions a record must meet to be saved, with their message.
- Seal records (Sellar registros): from a given state on, the record can no longer be edited.
How it works
Section titled “How it works”- Go to Settings → Collections → the collection → Rules (Reglas).
- Turn on States: choose the state field, the initial state and add transitions (from, to and which roles may use each one).
- A transition can ask for fields in a dialog (for example, the reason for losing a deal) and run code after the transition.
- Add validations with the message the person sees when they fail.
- Turn on Seal records and choose the state that seals.
- In the record page, transitions appear as buttons and in the stage bar.
Rules and limits
Section titled “Rules and limits”- Rules apply the same in the app, the API, MCP, scripts and automations.
- Configuration collections only have validations.
- A sealed record cannot be edited or versioned.
- Only an administrator can force a state without a transition (to fix a mistake); the transition’s automations do not run.
For agents (MCP)
Section titled “For agents (MCP)”- States, transitions and validations are changed in the schema with
patch_schema_draft(update_collection); format inget_field_guideandexport_schema. update_recordchanges the state only through a valid transition.force_record_state: administrators only; moves the record to any state.