How-to

Define an action

An action is something the product does to a record — set fields, create a related record, start or move its workflow, record a notice — defined once, and run from a record or from a workflow effect through the same checked path.

For: Builder, Platform administrator, Tenant administrator

Prerequisite

  • application.write to define an action and application.publish to publish it — at the platform for a platform action, in the tenant for a tenant's own.
  • The entity whose records it runs on; for Create a related record, a relation of that entity.

Steps

  1. Open Action & Application Runtime Designer (at the platform: Application Runtime Designer) and choose the Actions lens in the bar.
  2. Under Define an action, choose What it does and Runs on records of.
  3. Give a key (for example engagement.mark_delivered) and a name.
  4. Declare what it does: for Set field values, each field and its value; for Create a related record, the relation and the new record's values; for Move the record in its workflow, the transition key; for Notify, the notice.
  5. Choose the permission a person needs to run it (record.write for a change to a record) and whether it asks for confirmation.
  6. Press Define action, then Publish version 1.

Result

The action appears in a record's Run an action… (the flow board's card menu) for the records it runs on, and a workflow effect can run it by its key. Every run checks the action's published version, whether it applies to the record, the person's permission and the record's rules, and is traced and written to the tenant's trail; a refusal is said in a sentence.

Keep in mind Notify has no in-app notification storage yet: the notice is kept in the tenant's audit trail only, and nobody is sent a message. An action a tenant defines with the same key as a platform action wins in that tenant.

Tip To change a published action, press New draft version, then publish it; runs use the published version.