Calculation fields already let a value stay in sync with a SQL formula. Two new features extend that idea to full PHPScript — the same language that powers your automations — right on the table.
What's new
- Script fields — a virtual, read-only field whose value is the result of a short PHPScript snippet, computed fresh each time you open the record. Reach past plain math: query related records, format a value, or build a small HTML badge. It stores nothing and never gets in the way of a write.
- Validation rules — one PHPScript per table that runs before every create, update, and delete. Return a message to block the write and show it to the user; return nothing to let it through. It sees the proposed values, the current stored values, the line items, the acting user, and how the write arrived.
Why it matters
Some rules don't fit a Required checkbox. "A deal can't be marked won without a close date." "A posted invoice can't be edited or deleted." "This table is maintained by our integration, not by hand." Until now those lived in a flow that fired after the fact, or nowhere at all. A validation rule enforces them at the moment of the write, atomically — the whole record and its line items pass or fail as one unit.
Because a rule knows how a write arrived, you can lock a table down to automations: allow writes from the API and from flows, and block interactive edits. That turns a table into a system of record your team reads but only your integrations change.
Read up on both in the help docs: script fields and validation rules. They share the PHPScript engine, so everything you already know from automations carries over.