Skip to content
Flux Forms

Home / Data

Run Apex actions

Run an approved Apex class on submit, with typed inputs and outputs like a flow's.

Run Apex is a submission action type that runs an Apex class your administrator has approved, with its inputs and outputs mapped exactly the way a flow's variables are.

Reach for it when the work is easier to express in code than in a flow — a calculation, a callout, a lookup with rules a flow would make clumsy.

Adding one

  1. In Submission Actions, add a step, then Add action, and choose Run Apex.
  2. Pick the Apex handler. The picker lists only the handlers approved for this form, by name your administrator gave them.
  3. Inputs and Outputs appear as typed rows, built from the contract the class declares.
  4. Map each input from a form field, a constant, an earlier action's result or a submission field — the same sources as any other action. See Submission actions.
  5. Capture an output under a reference name if a later action needs it.

Everything else behaves like any other action: conditions, ordering, reference names, and the step's All or nothing rollback.

There is no free-text box

You cannot type a class name. If the form's purposes approve no handlers, the action shows a hint saying so and pointing at Purpose Manager, and there is nothing to fill in.

That is deliberate: an unapproved class must not be expressible, not merely blocked at run time. Save also rejects a form whose action names a class its purposes do not approve, naming the class.

When the contract changes

The inputs and outputs you map are the ones captured when the administrator approved the class. If a developer changes the class's signature, ask your administrator to re-approve it so the contract is refreshed, then re-check your mappings. See Approve Apex handlers.

What you see afterwards

On the submission, Submit Action Result shows the action as Completed with the outputs the handler returned, or Error carrying the handler's own message. See Submissions.

An Invoke flow action pointing at an on-demand flow uses the same machinery underneath — it runs through an Apex class registered by an administrator. You do not configure anything for it; the routing is automatic. See Apex Handler Settings.

Last updated: 2026-09-10