Skip to content

This pattern is for builders deciding what happens when a record is no longer needed. Read it after My First Application. By the end you will know when to archive, when (rarely) to delete for good, how to automate both, and how archiving differs from simply ending a record’s workflow.

Records stop being useful: a ticket is closed, a vacancy is filled, a supplier is no longer used. If people delete them, the history goes with them — who approved what, which records pointed at them, what the figures were last year. If nobody removes them, active lists fill up with clutter and people stop trusting them.

You need a way to take records out of daily use without losing them, and a deliberate, controlled way to remove the few that really must go.

Use archiving as the default for every entity whose records might be needed again — for an audit, a report, a returning customer, a dispute. That is almost every business entity.

Use permanent deletion only when there is a genuine reason to purge: a retention period that has run out, a record created by mistake that nothing else points at, test records before go-live in a test environment.

What archiving does:

  • The record drops out of the normal list but is kept, with its history, and an administrator can restore it.
  • People switch a view’s Status menu to Archived to see archived records, when the view allows it.
  • Statistic queries — and so summaries, dashboards and counters — always leave archived records out.
  • Archiving or restoring a source record archives or restores its copies in virtual entities.
  1. Open the entity: Administration › Applications › Data Entities, then the entity, and select the Views tab.
  2. Open the view and, under the forms, turn on Archive entries. See Design the forms.
  3. Decide whether people may find archived records again: under Search & filter, turn on Archived entries. See Search and filters.
  4. Save and publish the view.

Restoring is not done from a view: an administrator restores a record on its page in Administration with Restore Archived Records. Tell your users so — see Archive and restore records.

  1. On the entity’s Reactions tab, add a reaction.
  2. Choose the event — for example On Workflow Action Executed for the action that closes the record, or a Timer that runs every night.
  3. Under Filter, narrow it to the records that should go — for example records closed more than 90 days ago.
  4. Choose Action Type Archive Data Entry.

To react to archiving — notify someone, tidy a related record — use the events On Entry Archived and On Entry Restored Since 1.8.

Permanent deletion stays rare and deliberate, and it only ever applies to records that are already archived — so every record passes through a restorable state first.

  • By an administrator. On the archived record’s page in Administration, Permanently Delete Records removes it. The dialog refuses while other records still point at it. See Archive and restore records.
  • By a reaction. Delete Archived Entry Since 1.8 permanently deletes the archived records the reaction reaches. Its Scope chooses them: Current Entry (the record that set the reaction off), Reference or Relation (records linked to it), or Saved Query (the records of a query you pick in Choose query). Records that are not archived are never deleted. A typical use: when a parent record is archived (On Entry Archived), delete its archived child records through a Relation.

A Timer reaction works through active records only, so on its own it does not pick up archived records for a scheduled retention purge. If your policy needs one, design it with your developers and rehearse it in a test environment before relying on it.

The same idea applies one level up. Archive an entity you no longer use from the three dots on its card; it keeps the entity and its records. Delete an entity permanently Since 1.10 only when it truly has to go: only a system administrator can do it, the dialog lists everything that still points at the entity, and Delete stays disabled until each link is removed. See Archive or delete an entity.

If some records must never be archived — for example an invoice that is not yet paid — the check is a Standalone Validator, which can run when a record is archived. Validators are functions your developers write: deep code, not a designer setting.

Worked example: closing jobs in Recruitment

Section titled “Worked example: closing jobs in Recruitment”

In the Recruitment tutorial, the Job review step has an action named Archive. It is worth being precise about what it does:

  • Archive is the step’s reject action, renamed. It sends the job to the final step, ending the workflow.
  • A reaction on that action sets the Job status field to Archived, and another notifies the job’s creator.
  • The job record itself is not archived. It stays in the active list of All jobs, marked Archived by its status field.

That is a sensible choice for a vacancy HR may want to look back at. If you also want archived jobs out of the active lists:

  1. On the Jobs entity’s Reactions tab, add a reaction Archive the job.
  2. Event: On Workflow Action Executed, step Job review, action Archive.
  3. Action Type: Archive Data Entry.

Now the job leaves the active list, statistic summaries such as Jobs by status no longer count it, and an administrator can still restore it. If you add this reaction, check the Jobs by status summary still tells the story you want — archived jobs no longer appear in it.

For a retention rule — say, purge archived jobs after two years — plan who deletes them and how, as described in Purge for good.

  • A home-made Is deleted field. Every view, query, summary and reaction must then remember to filter it out, and one that forgets shows “deleted” records. Use archiving, which the platform already leaves out of lists and statistics.
  • Hard-deleting records other records point at. References break and history is lost. The platform refuses to delete a record while others still point at it; don’t work around that by clearing the links. Archive instead.
  • Purging to “clean up” before go-live in the live environment. Deletion cannot be undone. Rehearse in a test environment and move the application with a package.
  • Calling a workflow ending “archived” and stopping there. As in the example, a status label does not take the record out of lists. Decide which you need — a status, an archive, or both — and build that.

Platform 1.10.0 · Backend 1.11.0-alpha.11 · Frontend 1.11.0-alpha.6 · Mobile 1.10.2 · Chart 1.11.8 · Gateway 2.6.11 · MCP 0.2.0 · Grafana DS 1.2.0Docs build 2026-11-27