diff --git a/src/System Application/App/Email/src/EmailInstaller.Codeunit.al b/src/System Application/App/Email/src/EmailInstaller.Codeunit.al index 567b5c1af0..4835f8dfe8 100644 --- a/src/System Application/App/Email/src/EmailInstaller.Codeunit.al +++ b/src/System Application/App/Email/src/EmailInstaller.Codeunit.al @@ -7,7 +7,6 @@ namespace System.Email; using System.DataAdministration; using System.Upgrade; -using System.Environment.Configuration; using System.Reflection; #pragma warning disable AA0235 @@ -62,10 +61,4 @@ codeunit 1596 "Email Installer" begin AddRetentionPolicyAllowedTables(true); end; - - [EventSubscriber(ObjectType::Codeunit, Codeunit::"System Initialization", OnAfterLogin, '', false, false)] - local procedure AddAllowedTablesOnAfterSystemInitialization() - begin - AddRetentionPolicyAllowedTables(); - end; } \ No newline at end of file diff --git a/src/System Application/App/Performance Profiler/src/PerformanceProfilerInstaller.Codeunit.al b/src/System Application/App/Performance Profiler/src/PerformanceProfilerInstaller.Codeunit.al index a4db7cddab..5a76e169ed 100644 --- a/src/System Application/App/Performance Profiler/src/PerformanceProfilerInstaller.Codeunit.al +++ b/src/System Application/App/Performance Profiler/src/PerformanceProfilerInstaller.Codeunit.al @@ -5,7 +5,6 @@ namespace System.Tooling; -using System.Environment.Configuration; using System.DataAdministration; using System.PerformanceProfile; using System.Upgrade; @@ -56,10 +55,4 @@ codeunit 1933 "Performance Profiler Installer" begin AddRetentionPolicyAllowedTables(true); end; - - [EventSubscriber(ObjectType::Codeunit, Codeunit::"System Initialization", OnAfterLogin, '', false, false)] - local procedure AddAllowedTablesOnAfterSystemInitialization() - begin - AddRetentionPolicyAllowedTables(false); - end; } \ No newline at end of file diff --git a/src/System Application/App/Retention Policy/src/Install/RetentionPolicyInstaller.Codeunit.al b/src/System Application/App/Retention Policy/src/Install/RetentionPolicyInstaller.Codeunit.al index d8a540d0d1..c54d5cdac1 100644 --- a/src/System Application/App/Retention Policy/src/Install/RetentionPolicyInstaller.Codeunit.al +++ b/src/System Application/App/Retention Policy/src/Install/RetentionPolicyInstaller.Codeunit.al @@ -5,7 +5,6 @@ namespace System.DataAdministration; -using System.Environment.Configuration; using System.Upgrade; using System.Environment; @@ -108,10 +107,4 @@ codeunit 3907 "Retention Policy Installer" begin AddAllowedTables(true); end; - - [EventSubscriber(ObjectType::Codeunit, Codeunit::"System Initialization", OnAfterLogin, '', false, false)] - local procedure AddAllowedTablesOnAfterLogin() - begin - AddAllowedTables(); - end; } \ No newline at end of file diff --git a/src/System Application/App/Retention Policy/src/Retention Policy Setup/RetentionPolicySetupList.Page.al b/src/System Application/App/Retention Policy/src/Retention Policy Setup/RetentionPolicySetupList.Page.al index 8c5bc5ac07..04663d194d 100644 --- a/src/System Application/App/Retention Policy/src/Retention Policy Setup/RetentionPolicySetupList.Page.al +++ b/src/System Application/App/Retention Policy/src/Retention Policy Setup/RetentionPolicySetupList.Page.al @@ -154,7 +154,9 @@ page 3903 "Retention Policy Setup List" trigger OnOpenPage() var FeatureTelemetry: Codeunit "Feature Telemetry"; + RetenPolAllowedTables: Codeunit "Reten. Pol. Allowed Tables"; begin FeatureTelemetry.LogUptake('0000FW0', 'Retention policies', Enum::"Feature Uptake Status"::Discovered); + RetenPolAllowedTables.OnRefreshAllowedTables(); end; }