mirror of
https://github.com/microsoft/BCQuality.git
synced 2026-10-07 23:56:56 +01:00
Address second review round on retention policy knowledge
- Scope both articles to bc-version [22..]: FindOrCreateRetentionPeriod first appears in the 21.1 System Application and OnRefreshAllowedTables in 22. - Reframe the default-setup article as optional guidance; registration without a setup is valid. The anti-pattern and review routing now cover only false claims that registration alone cleans up data. - Make all four samples self-contained: declare Contoso Activity Log in each, add the Retention Policy Setup permission, and guard the default setup on IsAllowedTable. - Let evaluation overrides list additionalArticles and register both retention pairs as extra privacy cases (38 cases, existing IDs unchanged). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
4bef582ffe
commit
07a171386d
10 changed files with 177 additions and 30 deletions
|
|
@ -1,13 +1,35 @@
|
|||
table 50568 "Contoso Activity Log"
|
||||
{
|
||||
DataClassification = SystemMetadata;
|
||||
|
||||
fields
|
||||
{
|
||||
field(1; "Entry No."; Integer) { AutoIncrement = true; }
|
||||
field(2; "Activity"; Text[250]) { }
|
||||
}
|
||||
|
||||
keys
|
||||
{
|
||||
key(PK; "Entry No.") { Clustered = true; }
|
||||
}
|
||||
}
|
||||
|
||||
codeunit 50564 "Contoso Reten. Pol. Default"
|
||||
{
|
||||
Access = Internal;
|
||||
Permissions = tabledata "Retention Policy Setup" = ri;
|
||||
|
||||
procedure CreateDefaultPolicy()
|
||||
var
|
||||
RetentionPolicySetup: Record "Retention Policy Setup";
|
||||
RetentionPolicySetupMgt: Codeunit "Retention Policy Setup";
|
||||
RetenPolAllowedTables: Codeunit "Reten. Pol. Allowed Tables";
|
||||
UpgradeTag: Codeunit "Upgrade Tag";
|
||||
begin
|
||||
// A setup can only be created for a table that is already registered.
|
||||
if not RetenPolAllowedTables.IsAllowedTable(Database::"Contoso Activity Log") then
|
||||
exit;
|
||||
|
||||
// Created once per company: an administrator who deletes the policy
|
||||
// does not get it back on the next upgrade.
|
||||
if UpgradeTag.HasUpgradeTag(DefaultPolicyTag()) then
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue