Skip to content

Change Context – returning to an earlier record

The command "Change Context" makes an earlier record the current record again – the record the action started with, or the record an earlier command created or opened. This page is for administrators who build actions that work on more than one record.


1. At a glance

Purpose Switch the record the following commands work on back to a record the action already had
Typical use Create a related record, fill it, then continue on the record the action started with
Where in the editor Toolbar menu "Flow" → "Change Context"
Needs a user interface No
Needs a current record No
Changes the current record Yes
Related Create Entity Record, Go To Record, Actions – the current record

2. Settings

The setting is on the tab "Settings". Like every command, the command also has "Display Name", "Description" and "Execution Condition" on the tab "General" (see Actions).

Setting Meaning Default / Required
"Context" The record that becomes current. "Original Context ()" is the record the run started with – also after loops, switches and pre commands. "Context from """ is the record that was current right after that command ran. Required

The list offers the original context and every command before this one that changes the context – Create Entity Record, Go To Record and other Change Context commands – also those before an enclosing loop or case.


3. Behaviour

  1. While the action runs, nexxcite remembers for every command which record was current right after it, and the record the run started with as the original context. Loops, switch cases and the pre commands of the action do not change the original context, even if they work on another record.
  2. Change Context makes the remembered record of the chosen command the current record. All following commands work on it, until the next context change.
  3. The editor shows the change: the following commands are grouped under the entity of the chosen record.
  4. If nothing is remembered for the chosen command – because it has not run (its execution condition was false, it is in a case that did not run, or it comes later) or no context is selected – the following commands have no current record. Commands that need one are skipped or end the action. The command itself does not fail; a warning is written to the log.

The record is the same object the earlier command worked with, including changes that are not saved yet.


4. Examples

Back to the order after creating an invoice. An action on "Order":

  1. Create Entity Record "Create invoice" (entity "Invoice") – the invoice is now current.
  2. Update Entity Record – sets amount and due date of the invoice, "Save" on.
  3. Change Context – "Context": "Original Context (Order)".
  4. Update Entity Record – sets the status of the order to "Invoiced", "Save" on.

Back to a record created earlier. After "Create invoice", the action opens the customer with Go To Record, updates it and then continues on the invoice with "Context from "Create invoice"".


5. Limitations

  • The record after a command is remembered when the next command in the same list starts. For the last command inside a loop or a switch case, nothing is remembered; choosing it leaves the following commands without a record.