Table 3901 "Retention Policy Setup"
System Application · System.DataAdministration
Across versions
- BC23present
- BC24declaration changed
- BC251 fields changed
- BC26-29unchanged
- BC301 fields added
Neighbourhood 10 connected objects and pages
System Application · System.DataAdministration · BC23-30 · source at ea08af5e · facts from BC29
Learn documents this table through its pages: Page 3901 “Retention Policy Setup Card” (1 Learn page), Page 3903 “Retention Policy Setup List” (1).
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 Δ BC25 | Integer | Specifies the ID of the table to which the retention policy applies. via Page 3901 “Retention Policy Setup Card” | TableRelation AllObjWithCaption.“Object ID” where(“Object Type” = const(Table)); NotBlank; DataClassification SystemMetadata |
| 2 | Table Name | Text[30] | Specifies the name of the table to which the retention policy applies. via Page 3901 “Retention Policy Setup Card” | FlowField: lookup(AllObjWithCaption.“Object Name” where(“Object Type” = const(Table), “Object ID” = field(“Table Id”))); not editable |
| 3 | Table Caption | Text[249] | Specifies the caption of the table to which the retention policy applies. The caption is the translated, if applicable, name of the table. via Page 3901 “Retention Policy Setup Card” | FlowField: lookup(AllObjWithCaption.“Object Caption” where(“Object Type” = const(Table), “Object ID” = field(“Table Id”))); not editable |
| 4 | Retention Period | Code[20] | Specifies an identifier for the retention period. via Page 3901 “Retention Policy Setup Card” | TableRelation Table 3900 “Retention Period” (“Retention Period”.Code); DataClassification CustomerContent |
| 5 | Enabled | Boolean | Specifies whether the retention policy is enabled. via Page 3901 “Retention Policy Setup Card” | DataClassification SystemMetadata |
| 6 | Apply to all records | Boolean | Specifies whether the retention policy applies to all records in the table. If you want to specify criteria for the records to delete, this toggle must be turned off. via Page 3901 “Retention Policy Setup Card” | 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. via Page 3901 “Retention Policy Setup Card” | 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. via Page 3901 “Retention Policy Setup Card” | 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. via Page 3901 “Retention Policy Setup Card” | FlowField: lookup(Field.“Field Caption” where(TableNo = field(“Table ID”), “No.” = field(“Date Field No.”))); not editable |
| 10 | Manual | Boolean | Specifies whether the retention policy can only be run manually. via Page 3901 “Retention Policy Setup Card” | DataClassification SystemMetadata |
| 100 | Number Of Records Deleted | Integer | — | not editable; DataClassification SystemMetadata |
Keys
- PrimaryKey: Table Id (clustered)
Trigger event subscribers
- OnAfterDeleteEvent: Codeunit 3912 “Reten. Policy Telemetry Impl.” OnDeleteRetentionPolicySetup, Codeunit 3912 “Reten. Policy Telemetry Impl.” SendTelemetryOnAfterDelete, Codeunit 3998 “Retention Policy Scheduler” CheckRetentionPolicyScheduleOnAfterDelete
- OnAfterInsertEvent: Codeunit 3902 “Retention Policy Setup” InsertDefaultTableFiltersOnAfterInsertRetenPolSetup, Codeunit 3912 “Reten. Policy Telemetry Impl.” OnInsertRetentionPolicySetup, Codeunit 3912 “Reten. Policy Telemetry Impl.” SendTelemetryOnAfterInsert, Codeunit 3998 “Retention Policy Scheduler” CheckRetentionPolicyScheduleOnAfterInsert
- OnAfterModifyEvent: Codeunit 3912 “Reten. Policy Telemetry Impl.” OnModifyRetentionPolicySetup, Codeunit 3912 “Reten. Policy Telemetry Impl.” SendTelemetryOnAfterModify, Codeunit 3998 “Retention Policy Scheduler” CheckRetentionPolicyScheduleOnAfterModify
- OnBeforeInsertEvent: Codeunit 3902 “Retention Policy Setup” VerifyRetentionPolicyAllowedTablesOnBeforeInsertRetenPolSetup
- OnBeforeRenameEvent: Codeunit 3902 “Retention Policy Setup” ErrorOnBeforeRenameRetentionPolicySetup
Procedures
1 local procedures, no public ones.
Triggers
OnDelete, OnInsert
Relations
- Retention Period: TableRelation Table 3900 “Retention Period”
Pages and codeunits on this table
- Page 3901 “Retention Policy Setup Card” (source table)
- Page 3903 “Retention Policy Setup List” (source table)
- Page 3905 “Reten. Policy Setup ListPart” (source table)
- Codeunit 3904 “Apply Retention Policy Impl.” (codeunit runs on it)
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 3903 “Retention Policy Setup Impl.” (1 call:
OnDelete → DeleteRetentionPolicySetup)
Recent changes
- 2026-09-23 #11262 Fix retention policy deletion-limit stop propagation (main, BC30, fix)
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"), then bcatlas_get_procedure_body or bcatlas_get_neighbors on the returned id.