---
id: object/codeunit/600
type: object
title: Codeunit 600 "Data Archive"
summary: Codeunit 600 "Data Archive" in System Application (System.DataAdministration). 13 public procedures, 2 events. Present since at least BC23, still in BC30.
tier: official
language: en
tags:
  - codeunit
  - system application
versions:
  introduced: null
  last_changed: null
  deprecated: null
review:
  state: derived
  by: null
  at: null
  flags: []
generated:
  at: "2026-10-11T00:31:51.816Z"
  pipeline: 0.2.0
  prompts: {}
  input_hash: 4e7f23eb6c2dbb8ed56acf0a30585f649073ee952908bfe61ff13ef43b1338cb
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/System%20Application/App/Data%20Archive/src/DataArchive.codeunit.al
    title: src/System Application/App/Data Archive/src/DataArchive.codeunit.al (releases/29.x)
    date: null
    commit: ea08af5ef2d6a9b5c5af4a029288abbe2c883220
    t: null
    quote: null
links:
  learn: []
  objects: []
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
object_type: codeunit
object_id: 600
name: Data Archive
namespace: System.DataAdministration
app: System Application
extends: null
first_version: "23"
last_version: "30"
present_in:
  - "23"
  - "24"
  - "25"
  - "26"
  - "27"
  - "28"
  - "29"
  - "30"
changed_in: []
source_major: "29"
obsolete: null
countries: []
ms_search_form_ids: []
counts:
  fields: 0
  procedures: 15
  events: 2
  subscribers: 0
relations:
  out: 0
  referenced_by: 0
  pages: 0
  extended_by: 0
  event_subscribers: 2
  calls: 1
  called_by: 12
  implements: 0
---

# Codeunit 600 "Data Archive"

> Codeunit 600 "Data Archive" in System Application (System.DataAdministration). 13 public procedures, 2 events. Present since at least BC23, still in BC30.

System Application · System.DataAdministration · BC23-30 · [source at ea08af5e](https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/System%20Application/App/Data%20Archive/src/DataArchive.codeunit.al) · facts from BC29

## Properties

| Property | Value |
|---|---|
| Access | Public |

## Events published

- `OnDataArchiveImplementationExists(var Exists: Boolean)` (integration): Checks if there is an implementation of an IDataArchiveProvider
  - subscribers: [Codeunit 605 "Data Archive Provider"](../codeunit/605.md) OnDataArchiveImplementationExists
- `OnDataArchiveImplementationBind(var IDataArchiveProvider: Interface "Data Archive Provider"; var IsBound: Boolean)` (integration): Asks for an implementation of an IDataArchiveProvider
  - subscribers: [Codeunit 605 "Data Archive Provider"](../codeunit/605.md) OnDataArchiveImplementationBind

## Procedures

- `Create(Description: Text): Integer`: Creates a new archive entry.
- `CreateAndStartLoggingDeletions(Description: Text): Integer`: Creates a new archive entry, resets the session and starts logging all new deletions.
- `Open(ID: Integer)`: Opens an existing archive entry.
- `Save()`: Saves and closes the currently open archive entry.
- `DiscardChanges()`: Discards any additions and closes the currently open archive entry.
- `SaveRecord(RecordVariant: Variant)`: Saves the supplied record to the currently open archive entry.
- `SaveRecord(var RecordRef: RecordRef)`: Saves the supplied record to the currently open archive entry.
- `SaveRecords(var RecordRef: RecordRef)`: Saves all records within the filters to the currently open archive entry.
- `StartSubscriptionToDelete()`: Starts subscription to the OnDatabaseDelete trigger and calls SaveRecord with any deleted record.
- `StartSubscriptionToDelete(ResetSession: Boolean)`: Starts subscription to the OnDatabaseDelete trigger and calls SaveRecord with any deleted record.
- `StopSubscriptionToDelete()`: Stops the subscription to the OnDatabaseDelete trigger.
- `DataArchiveProviderExists(): Boolean`: Informs the consumer app whether there is a provider for this interface.
- `SetDataArchiveProvider(var NewDataArchiveProvider: Interface "Data Archive Provider")`: Checks if there is an implementation of an IDataArchiveProvider

## Calls

From the extracted call graph of BC29 (graphify-al on the snapshot checkout): calls whose target is known from a declared type or an `Object::"Name"` argument. Interface dispatch and calls through events are not counted, so the list is not complete.

- [Codeunit 610 "Data Archive Implementation"](../codeunit/610.md) (11 calls: `Create → Create`, `CreateAndStartLoggingDeletions → CreateAndStartLoggingDeletions`, `DataArchiveProviderExists → DataArchiveProviderExists`, …)

## Called by

- [Report 398 "Date Compress Vendor Ledger"](../report/398.md) (4 calls: `InitializeParameter → DataArchiveProviderExists`, `InitializeRequest → DataArchiveProviderExists`, `SummarizeDtldEntry → SaveRecord`, …)
- [Report 198 "Date Compress Customer Ledger"](../report/198.md) (3 calls: `InitializeParameter → DataArchiveProviderExists`, `SummarizeDtldEntry → SaveRecord`, `SummarizeEntry → SaveRecord`)
- [Codeunit 610 "Data Archive Implementation"](../codeunit/610.md) (2 calls: `BindImplementation → OnDataArchiveImplementationBind`, `DataArchiveProviderExists → OnDataArchiveImplementationExists`)
- [Report 1198 "Date Compress Resource Ledger"](../report/1198.md) (2 calls: `InitializeParameter → DataArchiveProviderExists`, `SummarizeEntry → SaveRecord`)
- [Report 1498 "Date Compress Bank Acc. Ledger"](../report/1498.md) (2 calls: `InitializeParameter → DataArchiveProviderExists`, `SummarizeEntry → SaveRecord`)
- [Report 7139 "Date Comp. Item Budget Entries"](../report/7139.md) (2 calls: `InitializeVariables → DataArchiveProviderExists`, `SummarizeEntry → SaveRecord`)
- [Report 97 "Date Compr. G/L Budget Entries"](../report/97.md) (2 calls: `InitializeParameter → DataArchiveProviderExists`, `SummarizeEntry → SaveRecord`)
- [Report 98 "Date Compress General Ledger"](../report/98.md) (2 calls: `InitializeParameter → DataArchiveProviderExists`, `SummarizeEntry → SaveRecord`)
- [Report 5696 "Date Compress FA Ledger"](../report/5696.md) (1 call: `SummarizeEntry → SaveRecord`)
- [Report 5697 "Date Compress Insurance Ledger"](../report/5697.md) (1 call: `SummarizeEntry → SaveRecord`)
- [Report 5698 "Date Compress Maint. Ledger"](../report/5698.md) (1 call: `SummarizeEntry → SaveRecord`)
- [Report 95 "Date Compress VAT Entries"](../report/95.md) (1 call: `InitializeRequest → DataArchiveProviderExists`)

## Across versions

- Present in: BC23-30
- Changed (declaration) in: none

Source: AL metadata extracted from the code (names, ids, signatures, properties); no code bodies (D10).

## Ask your agent

Procedure bodies are not stored here (D10). The call sections above are our own, per object, from the BC29 call graph. For a procedure body or the calls of one procedure, ask bc-code-atlas (external, by Stefan Maron, MIT; default corpus w1-28), which the bc-observatory plugin connects: `bcatlas_resolve_node(object_type: "codeunit", object_name: "Data Archive")`, then `bcatlas_get_procedure_body` or `bcatlas_get_neighbors` on the returned id.
