Codeunit 3905 "Reten. Pol. Allowed Tables"
System Application · System.DataAdministration
Across versions
- BC23-27present
- BC282 procedures added
- BC29-30unchanged
Neighbourhood 17 connected objects and pages
System Application · System.DataAdministration · BC23-30 · source at ea08af5e · facts from BC29
Properties
| Property | Value |
|---|---|
| Access | Public |
| Permissions | tabledata Field = r, tabledata “Retention Policy Allowed Table” = r |
Events published
OnRefreshAllowedTables()(integration): This event is called when the user chooses to refresh the allowed tables.- subscribers: Codeunit 1596 “Email Installer” AddAllowedTablesOnRefreshAllowedTables, Codeunit 1933 “Performance Profiler Installer” AddAllowedTablesOnRefreshAllowedTables, Codeunit 30273 “Shpfy Installer” AddAllowedTablesOnRefreshAllowedTables, Codeunit 3907 “Retention Policy Installer” AddAllowedTablesOnRefreshAllowedTables, Codeunit 3999 “Reten. Pol. Install - BaseApp” AddAllowedTablesOnRefreshAllowedTables
Event subscriptions
- VerifyInsertAllowed subscribes to Table “Retention Policy Allowed Table” OnBeforeInsertEvent
- ErrorOnBeforeRenameAllowedTable subscribes to Table “Retention Policy Allowed Table” OnBeforeRenameEvent
- VerifyModifyAllowed subscribes to Table “Retention Policy Allowed Table” OnBeforeModifyEvent
Procedures
AddAllowedTable(TableId: Integer): Boolean: Adds a table to the list of allowed tables.AddAllowedTable(TableId: Integer; DefaultDateFieldNo: Integer): Boolean: Adds a table to the list of allowed tables.AddAllowedTable(TableId: Integer; DefaultDateFieldNo: Integer; MandatoryMinRetenDays: Integer): Boolean: Adds a table to the list of allowed tables.AddAllowedTable(TableId: Integer; DefaultDateFieldNo: Integer; TableFilters: JsonArray): Boolean: Adds a table to the list of allowed tables.AddAllowedTable(TableId: Integer; TableFilters: JsonArray): Boolean: Adds a table to the list of allowed tables.AddAllowedTable(TableId: Integer; DefaultDateFieldNo: Integer; MandatoryMinRetenDays: Integer; RetenPolFiltering: Enum "Reten. Pol. Filtering"; RetenPolDeleting: Enum "Reten. Pol. Deleting"; TableFilters: JsonArray): Boolean: Adds a table to the list of allowed tables.AddTableFilterToJsonArray(var TableFilters: JsonArray; RetentionPeriodEnum: Enum "Retention Period Enum"; DateFieldNo: Integer; Enabled: Boolean; Locked: Boolean; RecordRef: RecordRef): This helper method is used to build an array of table filters which will be inserted automatically when creating a retention policy for the allowed table. You must first build up the array by calling this helper function and adding all relevant table filter information before passing the JsonArray t…AddTableFilterToJsonArray(var TableFilters: JsonArray; RetPeriodCalc: DateFormula; DateFieldNo: Integer; Enabled: Boolean; Locked: Boolean; RecordRef: RecordRef): This helper method is used to build an array of table filters which will be inserted automatically when creating a retention policy for the allowed table. You must first build up the array by calling this helper function and adding all relevant table filter information before passing the JsonArray t…RemoveAllowedTable(TableId: Integer): Boolean: Removes a table from the list of allowed tables.IsAllowedTable(TableId: Integer): Boolean: Checks whether a table exists in the list of allowed tables.GetAllowedTables(var AllowedTables: List of [Integer]): Returns the allowed tables as a list.GetAllowedTables(): Text: Returns the allowed tables as a filter string.GetRetenPolFiltering(TableId: Integer): Enum "Reten. Pol. Filtering": Returns the enum value set for retention policy filtering. This determines which code will handle the filtering of records when the retention policy for the allowed table is applied.GetRetenPolDeleting(TableId: Integer): Enum "Reten. Pol. Deleting": Returns the enum value set for retention policy deleting. This determines which code will handle the deleting of records when the retention policy for the allowed table is applied.GetDefaultDateFieldNo(TableId: Integer): Integer: Returns the number of the date or datetime field in the list of allowed tables for the given table.GetMandatoryMinimumRetentionDays(TableId: Integer): Integer: Returns the mandatory minimum number of retention days for the given table.CalcMinimumExpirationDate(TableId: Integer): Date: Calculates the minimum expiration date for a given allowed table based on the minimum number of retention days and today’s date.SetTruncateAllowed(TableId: Integer; TruncateAllowed: Boolean)+ BC28: Sets whether truncation is allowed for a given table.IsTruncateAllowed(TableId: Integer): Boolean+ BC28: Checks whether truncation is allowed for a given table.
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 3906 “Reten. Pol. Allowed Tbl. Impl.” (14 calls:
AddAllowedTable → AddToAllowedTables,AddTableFilterToJsonArray → AddTableFilterToJsonArray,CalcMinimumExpirationDate → CalcMinimumExpirationDate, …) - Codeunit 3908 “Retention Policy Log” (1 call:
ErrorOnBeforeRenameAllowedTable → LogError)
Called by
- Codeunit 3999 “Reten. Pol. Install - BaseApp” (19 calls:
AddChangeLogEntryToAllowedTables → AddAllowedTable,AddChangeLogEntryToAllowedTables → AddTableFilterToJsonArray,AddCRMIntegrationSynch → AddAllowedTable, …) - Codeunit 3903 “Retention Policy Setup Impl.” (3 calls:
NotifyOnMissingReadPermission → GetRetenPolFiltering,TableIdLookup → GetAllowedTables,VerifyRetentionPolicyAllowedTablesOnBeforeInsertRetenPolSetup → IsAllowedTable) - Codeunit 3904 “Apply Retention Policy Impl.” (3 calls:
CanApplyRetentionPolicy → IsAllowedTable,DeleteExpiredRecords → GetRetenPolDeleting,GetExpiredRecords → GetRetenPolFiltering) - Codeunit 3915 “Reten. Pol. Filtering Impl.” (2 calls:
ValidateExpirationDate → CalcMinimumExpirationDate,ValidateExpirationDate → GetMandatoryMinimumRetentionDays) - Codeunit 3994 “Reten. Pol. Doc. Arch. Fltrng.” (2 calls:
ValidateExpirationDate → CalcMinimumExpirationDate,ValidateExpirationDate → GetMandatoryMinimumRetentionDays) - Codeunit 6450 “Serv. Integration Mgt.” (2 calls:
InstallRetentionPolicies_OnAfterAddDocumentArchiveTablesToAllowedTables → AddAllowedTable,InstallRetentionPolicies_OnAfterAddDocumentArchiveTablesToAllowedTables → AddTableFilterToJsonArray) - Codeunit 1933 “Performance Profiler Installer” (1 call:
AddRetentionPolicyAllowedTables → AddAllowedTable) - Codeunit 8390 “Financial Report Auditing” (1 call:
AddRetentionPolicy → AddAllowedTable) - Page 3903 “Retention Policy Setup List” (1 call:
OnOpenPage → OnRefreshAllowedTables) - Page 9040 “Data Administration Guide” (1 call:
MaxRetentionPolicyCount → GetAllowedTables)
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: "Reten. Pol. Allowed Tables"), then bcatlas_get_procedure_body or bcatlas_get_neighbors on the returned id.