Skip to main content

Global Insert

Use the Global Insert trigger whenever you want a flow to start the moment a new record lands in Business Central. It listens at the database level, so any insert that matches your configuration will spin up the flow, whether the record was created through the Business Central UI, an API call, or a background process.

Typical examples include:

  • Watching for newly created sales orders so you can notify approvers.
  • Capturing fresh customer records and forwarding them to downstream systems.
  • Responding to posted warehouse entries to kick off logistics automations.

How it behaves at runtime

  1. Business Central inserts a record in the table you selected.
  2. AutoFlow checks the trigger configuration and applies any field filters you defined.
  3. If the filters pass, AutoFlow starts the flow and exposes one output named Rec, which contains the record ID of the inserted row for follow-up actions.

Because the trigger is wired directly into the platform wide OnDatabaseInsert event, it does not miss records coming from background tasks or integrations.

Configure the trigger

Open the flow editor, pick When a record is inserted, and then complete the configuration card.

Description

  • Purpose: Help your team understand when the flow executes at a glance.
  • When to fill it: Always. The description you enter shows up in trigger lists and execution history.
  • Tips: State both the table and potential filters, for example, New Sales Order (B2B) created.

Table No.

  • Purpose: Tell AutoFlow which Business Central table to monitor.
  • When to fill it: Required. Without a table number the trigger cannot subscribe to insert events.
  • Tips: Use the lookup to browse all tables. Stick to specific application tables; avoid temporary or buffer tables that are only used during posting routines.

Field Filters

  • Purpose: Limit executions to rows that match certain criteria.
  • When to fill it: Optional, but strongly recommended when only a subset of inserts should fire the flow.
  • How it works: Each filter entry maps a field number to a Business Central filter string. AutoFlow applies the filters before the flow starts, so only matching inserts continue. Leave the list empty to react to every insert on the chosen table.
  • Tips: Combine filters with record permissions. For example, filter sales orders by Document Type=Order or customers by Blocked=<>All to reduce noise.

Best practices

  • Keep filters focused so the trigger does not run for records you will immediately skip in later steps.
  • Verify that the service account running the flow can read the table you monitor; otherwise retrieving Rec will fail downstream.
  • Give the trigger a meaningful description so future editors understand how the trigger is intended to behave.