Skip to content

Delete Entity Record – deleting the current or a related record

The command "Delete Entity Record" deletes the current record, or one record related to it. This page is for administrators who build actions that remove data.


1. At a glance

Purpose Delete a record from within an action
Typical use A "Delete" button with an extra condition, removing a position, cleaning up records in a loop
Where in the editor Toolbar menu "Data" → "Delete Entity Record"
Needs a user interface Only for "Confirm in UI"
Needs a current record Yes
Changes the current record After deleting the current record, there is none
Related For Each Related Record, Link/Unlink Entity Records

2. Settings

The settings are on the tab "General", below "Display Name", "Description" and "Execution Condition" (see Actions).

Setting Meaning Default / Required
"Confirm in UI" Asks the user before deleting Off
"Relationship" A relationship of the current record's entity. If set, a related record on its child side is deleted instead of the current record. Empty: the current record is deleted

3. Behaviour

  1. Without a current record, the command is skipped.
  2. With "Confirm in UI" and a user interface, the dialog "Confirm delete" asks "Do you want to delete this record?". "No" ends the action; nothing is deleted. Without a user interface, nobody is asked and the record is deleted.
  3. Without "Relationship": the current record is deleted immediately in the database – no save is needed. The delete limits of the user's roles apply; if they do not allow it, the command fails with "You are not allowed to delete this record.". Afterwards the action has no current record: following commands that need one are skipped or end the action.
  4. With "Relationship": the related record that is currently selected (for example in a related items grid) is deleted, otherwise the first related record. Exactly one record is deleted. A related record that was never saved is only removed from the relationship. If there is no related record, the command is skipped. Open forms are drawn again.

4. Examples

Delete with a guard. A button "Delete draft" runs an action with the execution condition "Status = Draft" and one command Delete Entity Record with "Confirm in UI" on, followed by Navigate to the dashboard "My drafts".

Delete all closed positions. For Each Related Record over "Order → Positions" with the constraint "Closed = true"; inside the loop, Delete Entity Record without "Relationship" deletes each position, because inside the loop the position is the current record.


5. Limitations

  • Deleting the current record does not close the form that shows it. Follow it with Navigate or Go To Record in an interactive action.
  • With "Relationship", only one record is deleted. To delete several, use a loop as in the example.
  • There is no undo. The record is deleted at once, even if a later command of the action fails.