---
id: object/table/3902
type: object
title: Table 3902 "Retention Policy Setup Line"
summary: Table 3902 "Retention Policy Setup Line" in System Application (System.DataAdministration). 12 fields, 4 public procedures. Present since at least BC23, still in BC30.
tier: official
language: en
tags:
  - table
  - 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: 2617e86016841e9c3c558ac62c16277eff986875fbeb2f5aa4afd287f4f2a744
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/System%20Application/App/Retention%20Policy/src/Retention%20Policy%20Setup/RetentionPolicySetupLine.Table.al
    title: src/System Application/App/Retention Policy/src/Retention Policy Setup/RetentionPolicySetupLine.Table.al (releases/29.x)
    date: null
    commit: ea08af5ef2d6a9b5c5af4a029288abbe2c883220
    t: null
    quote: null
links:
  learn: []
  objects: []
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
object_type: table
object_id: 3902
name: Retention Policy Setup Line
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: 12
  procedures: 4
  events: 0
  subscribers: 0
relations:
  out: 1
  referenced_by: 0
  pages: 1
  extended_by: 1
  event_subscribers: 6
  calls: 1
  called_by: 0
  implements: 0
---

# Table 3902 "Retention Policy Setup Line"

> Table 3902 "Retention Policy Setup Line" in System Application (System.DataAdministration). 12 fields, 4 public procedures. 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/Retention%20Policy/src/Retention%20Policy%20Setup/RetentionPolicySetupLine.Table.al) · facts from BC29

## Fields

Explanation: the field's ToolTip in the code; without one, the ToolTip of a page control bound to the field (marked via the page); without that, its Caption (marked caption) when that differs from the name.

| No. | Name | Type | Explanation | Notes |
|---|---|---|---|---|
| 1 | Table ID | Integer | — | not editable; DataClassification SystemMetadata |
| 2 | Table Name | Text[30] | — | FlowField: lookup(AllObjWithCaption."Object Name" where("Object Type" = const(Table), "Object ID" = field("Table Id"))); not editable |
| 3 | Table Caption | Text[249] | — | FlowField: lookup(AllObjWithCaption."Object Caption" where("Object Type" = const(Table), "Object ID" = field("Table Id"))); not editable |
| 4 | Line No. | Integer | — | not editable; DataClassification SystemMetadata |
| 5 | Enabled | Boolean | Specifies whether the retention policy is enabled for this subset. <small>via [Page 3902 "Retention Policy Setup Lines"](../page/3902.md)</small> | DataClassification SystemMetadata |
| 6 | Retention Period | Code[20] | Specifies an identifier for the retention period. <small>via [Page 3902 "Retention Policy Setup Lines"](../page/3902.md)</small> | TableRelation [Table 3900 "Retention Period"](../table/3900.md) ("Retention Period".Code); DataClassification SystemMetadata |
| 7 | Date Field No. | Integer | Specifies the number of the date or datetime field on the table used to determine the age of a record. <small>via [Page 3902 "Retention Policy Setup Lines"](../page/3902.md)</small> | TableRelation Field."No." where(TableNo = field("Table ID"), "Type" = filter(Date \| DateTime)); DataClassification SystemMetadata |
| 8 | Date Field Name | Text[30] | Specifies the name of the date or datetime field on the table used to determine the age of a record. <small>via [Page 3902 "Retention Policy Setup Lines"](../page/3902.md)</small> | FlowField: lookup(Field.FieldName where(TableNo = field("Table ID"), "No." = field("Date Field No."))); not editable |
| 9 | Date Field Caption | Text[80] | Specifies the caption of the date or datetime field on the table used to determine the age of a record. The caption is the translated name of the field. <small>via [Page 3902 "Retention Policy Setup Lines"](../page/3902.md)</small> | FlowField: lookup(Field."Field Caption" where(TableNo = field("Table ID"), "No." = field("Date Field No."))); not editable |
| 10 | Table Filter | Blob | — | DataClassification CustomerContent |
| 11 | Table Filter Text | Text[2048] | Specifies the filter in text format that defines a subset of records. <small>via [Page 3902 "Retention Policy Setup Lines"](../page/3902.md)</small> | DataClassification CustomerContent |
| 12 | Locked | Boolean | Specifies whether the retention policy is editable for this subset. <small>via [Page 3902 "Retention Policy Setup Lines"](../page/3902.md)</small> | not editable; DataClassification SystemMetadata |

## Keys

- PrimaryKey: Table ID, Line No. (clustered)

## Trigger event subscribers

- OnAfterDeleteEvent: [Codeunit 3912 "Reten. Policy Telemetry Impl."](../codeunit/3912.md) OnDeleteRetentionPolicySetupLine
- OnAfterInsertEvent: [Codeunit 3912 "Reten. Policy Telemetry Impl."](../codeunit/3912.md) OnInsertRetentionPolicySetupLine
- OnAfterModifyEvent: [Codeunit 3912 "Reten. Policy Telemetry Impl."](../codeunit/3912.md) OnModifyRetentionPolicySetupLine
- OnBeforeDeleteEvent: [Codeunit 3902 "Retention Policy Setup"](../codeunit/3902.md) CheckRecordLockedOnRetentionPolicySetupLineOnAfterDelete
- OnBeforeModifyEvent: [Codeunit 3902 "Retention Policy Setup"](../codeunit/3902.md) CheckRecordLockedOnRetentionPolicySetupLineOnAfterModify
- OnBeforeRenameEvent: [Codeunit 3902 "Retention Policy Setup"](../codeunit/3902.md) ErrorOnBeforeRenameRetentionPolicySetupLine

## Procedures

- `SetTableFilter()`: Use this procedure to open a Filter Page Builder page and store the resulting filter in view format on the current record.
- `GetTableFilterView(): Text`: Use this procedure to get the filter in view format stored in the current record.
- `GetTableFilterText(): Text[2048]`: Use this procedure to get the filter in text format stored in the current record.
- `IsLocked(): Boolean`: Use this procedure to verify whether the retention policy setup line is locked.

## Relations

- Retention Period: TableRelation [Table 3900 "Retention Period"](../table/3900.md)

## Pages and codeunits on this table

- [Page 3902 "Retention Policy Setup Lines"](../page/3902.md) (source table)

## Extended by

- [Table extension 3999 "Reten. Pol. Setup Line Ext."](../tableextension/3999.md)

## 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 3902 "Retention Policy Setup"](../codeunit/3902.md) (3 calls: `GetTableFilterText → GetTableFilterText`, `GetTableFilterView → GetTableFilterView`, `SetTableFilter → SetTableFilterView`)

## 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: "table", object_name: "Retention Policy Setup Line")`, then `bcatlas_get_procedure_body` or `bcatlas_get_neighbors` on the returned id.
