From 861ff3fd5380f79489094b0f4b2a29fbb8c8df2a Mon Sep 17 00:00:00 2001 From: Bert Verbeek Date: Wed, 3 Apr 2024 16:33:05 +0200 Subject: [PATCH 1/2] Fix deadlock when you try to reset the adlse table. Now you cannot disable the adlse table. --- businessCentral/app/src/Table.Table.al | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/businessCentral/app/src/Table.Table.al b/businessCentral/app/src/Table.Table.al index 7e3a985..4dfc1a8 100644 --- a/businessCentral/app/src/Table.Table.al +++ b/businessCentral/app/src/Table.Table.al @@ -28,7 +28,12 @@ table 82561 "ADLSE Table" trigger OnValidate() var ADLSEExternalEvents: Codeunit "ADLSE External Events"; + ADLSETableErr: Label 'The ADLSE Table table cannot be disabled.'; begin + if Rec."Table ID" = Database::"ADLSE Table" then + if xRec.Enabled = false then + Error(ADLSETableErr); + if Rec.Enabled then CheckExportingOnlyValidFields(); @@ -176,8 +181,10 @@ table 82561 "ADLSE Table" begin if Rec.FindSet(true) then repeat - Rec.Enabled := true; - Rec.Modify(); + if not Rec.Enabled then begin + Rec.Enabled := true; + Rec.Modify(); + end; ADLSETableLastTimestamp.SaveUpdatedLastTimestamp(Rec."Table ID", 0); ADLSETableLastTimestamp.SaveDeletedLastEntryNo(Rec."Table ID", 0); From 2d7c46d287ff232ce623dc791f30a34cc39a05de Mon Sep 17 00:00:00 2001 From: Bert Verbeek Date: Fri, 5 Apr 2024 15:22:03 +0200 Subject: [PATCH 2/2] Add filter to exclude deleted records in Setup.Codeunit.al --- businessCentral/app/src/Setup.Codeunit.al | 1 + 1 file changed, 1 insertion(+) diff --git a/businessCentral/app/src/Setup.Codeunit.al b/businessCentral/app/src/Setup.Codeunit.al index 263398a..3964219 100644 --- a/businessCentral/app/src/Setup.Codeunit.al +++ b/businessCentral/app/src/Setup.Codeunit.al @@ -17,6 +17,7 @@ codeunit 82560 "ADLSE Setup" AllObjectsWithCaption: Page "All Objects with Caption"; begin AllObjWithCaption.SetRange("Object Type", AllObjWithCaption."Object Type"::Table); + AllObjWithCaption.SetFilter("Object ID", '<>%1', Database::"ADLSE Deleted Record"); AllObjectsWithCaption.Caption(SelectTableLbl); AllObjectsWithCaption.SetTableView(AllObjWithCaption);