Skip to content
Back to articles

Define When a Business Record Can Be Archived Instead of Deleted

Define archive eligibility, linked records, historical reports and restoration with a controlled acceptance test for a fictional service location.

Leer en español
Conceptual phone and computer interfaces connected by branching blue and coral paths with a review checkpoint
AI-generated conceptual illustration of a business software workflow; not a screenshot of a client system.

A service location is no longer used, but completed work still refers to it. Removing it from the system may break the context of those records. Leaving it in every selection list may invite new work at the wrong location. An archive action needs to resolve both concerns.

Define archiving as a specific application behavior, not a synonym for deletion. The acceptance exercise below uses fictional location records. It proposes product requirements; it does not describe a client implementation or determine how long a business must retain information.

AI-generated conceptual illustration; not a client screenshot.

Write the meaning of archived before adding the button

For this example, an archived location keeps its stable identifier and remains available to authorized people reviewing past work. It is unavailable for new assignments. Those are proposed rules for this application, not properties every archive feature provides automatically.

A concrete product example appears in Microsoft's guidance on deactivating accounts and contacts. In that model-driven app behavior, existing relationships remain available while inactive records cannot be edited or used to establish new relationships. Your own record types need an explicit contract.

Decide whether ordinary edits remain possible, which roles may archive or restore, and where archived records can be found. Clarify that archiving a customer or location record does not necessarily disable a person's login. Access removal is a separate operation unless the application deliberately connects them.

Identify the relationships that must survive

List the records and processes that reference the item: completed jobs, open assignments, recurring schedules, reports and external integrations. For each dependency, write down whether archiving is permitted, blocked or requires another action first.

The PostgreSQL documentation on foreign keys illustrates why deletion requires care: RESTRICT prevents deletion of a referenced row, while CASCADE can delete referencing rows. These are database behaviors, not an archive policy. Ask the implementation team to check the actual relationships rather than infer safety from a button label.

In the fictional location workflow, block archiving while an open job still needs the location. Show the blocking job reference to an authorized operator. Let the responsible person resolve or reassign that work through its normal process; do not silently move it to another location.

Specify what searches and reports should show

Separate selection for new work from historical lookup. A new-job picker should exclude the archived location under the proposed rule. A completed job should still display its location and offer an authorized route to the archived record.

Give users an explicit way to include archived items in administrative searches. Test direct links and exports as well as the main list. Hiding a row in the interface must not become the only enforcement of a rule against new assignments.

Agree how reports use status. A report of currently available locations may exclude archived ones; a historical report should follow its defined inclusion rules. Decide whether historical labels show the current location name or a saved snapshot. Do not let an archive filter silently change past totals.

Rehearse with two related records

Create a fictional location SITE-12, one completed job and one open job in a test environment. Record the identifiers and a baseline historical report. Then run this acceptance sequence:

  1. Attempt to archive SITE-12 while the open job exists. Confirm the action is blocked and explains the dependency.
  2. Resolve that job through the agreed test workflow, then archive the location with an authorized role. Record who acted and when.
  3. Verify that a new assignment cannot use SITE-12 through either the interface or the application's integration path.
  4. Open the completed job and the historical report. Confirm the reference, expected labels and totals remain intact.
  5. Try restoring SITE-12. Check current permissions and conflicts, such as another active location using a name that must be unique.

Add a concurrent test: another operator creates an assignment while the archive action is being processed. Define the acceptable outcome in advance. The system should not finish with an archived location attached to new work in violation of the agreed rule.

Keep restoration and deletion separate

Restoration should have its own acceptance cases. Reactivating the location need not reopen completed jobs, resume old schedules or resend integration events. Specify those consequences individually and verify the result after reopening the record.

Document permanent deletion separately, including dependencies, authority and any retention decisions that require specialist review. An archive flag is neither proof of erasure nor permission to keep information indefinitely.

Close the review with a short decision record: eligible state, blocking references, allowed roles, lookup behavior, reporting rules and restoration outcome. This gives the team something more useful to test than “add an Archive button.”

Contact Dynelink to define record lifecycle rules and acceptance checks for your business software.

Contact

Let’s talk about your project

Tell us what you want to build or improve, who will use it and what you need to solve.