Objects
Object scripts
Attach scripts to objects, test them safely, and understand how scripts differ from workflow nodes.
Object scripts
Object scripts attach code to an object so custom logic can run close to records. Use them for validations, transformations, calculated values, side effects, and integrations that cannot be expressed cleanly with form settings or Workflow Studio nodes.
How object scripts work
Scripts are part of Antly's script-enabled model layer. An object can list attached scripts, expose a playground for safe testing, and run scripts against record context. Object scripts differ from workflow script nodes: an object script belongs to the object surface, while a script node is one step in a versioned workflow graph.
Configure object scripts
- Open the object settings page and go to the scripts area.
- Create or attach the script with a clear name and trigger purpose.
- Use the playground with a known test record before enabling it for live use.
- Keep the script focused on one responsibility, such as normalising a field or calling a downstream action.
- Document any fields, aliases, or namespaces the script expects.
Script patterns
| Pattern | Use when | Notes |
|---|---|---|
| Record enrichment | A record needs computed or copied values after save. | Prefer stable question aliases over display labels. |
| Guardrail validation | Users should be blocked from invalid state changes. | Return clear messages so operators know what to fix. |
| Integration action | A record should call a third-party or module action. | Log enough context to troubleshoot failed calls. |
| Workflow helper | A workflow needs a custom calculation. | Consider a Workflow Studio script node if the logic only belongs to one workflow. |