From 7b7e9252b1d5673b44955aaf4f69fa70c8f39061 Mon Sep 17 00:00:00 2001 From: Mads Gram Date: Mon, 23 Feb 2026 21:56:12 +0100 Subject: [PATCH 1/7] Don't attempt to return to the original position for non-al defined indices --- .../App/Table Information/src/IndexesListPart.Page.al | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/System Application/App/Table Information/src/IndexesListPart.Page.al b/src/System Application/App/Table Information/src/IndexesListPart.Page.al index f642e34758..64da96df7b 100644 --- a/src/System Application/App/Table Information/src/IndexesListPart.Page.al +++ b/src/System Application/App/Table Information/src/IndexesListPart.Page.al @@ -144,7 +144,9 @@ page 8704 "Indexes List Part" Rec.DeleteAll(); // Clear the temporary table to make sure the disabled index is not shown. BuildInMemoryList(Rec.TableId); // Rebuild the in-memory list to get the updated index status. - Rec.Get(RecordIDOfCurrentPosition); // Return to the same position in the list after refreshing the data. + + if Rec."Metadata Defined" then + Rec.Get(RecordIDOfCurrentPosition); // Return to the same position in the list after refreshing the data. CurrPage.Update(false); end; @@ -177,7 +179,8 @@ page 8704 "Indexes List Part" Rec.DeleteAll(); // Clear the temporary table to make sure the disabled index is not shown. BuildInMemoryList(Rec.TableId); // Rebuild the in-memory list to get the updated index status. - Rec.Get(RecordIDOfCurrentPosition); // Return to the same position in the list after refreshing the data. + if Rec."Metadata Defined" then + Rec.Get(RecordIDOfCurrentPosition); // Return to the same position in the list after refreshing the data. CurrPage.Update(false); end; From 2db5480f43aeeb02353e03a080359feecfa6b293 Mon Sep 17 00:00:00 2001 From: Mads Gram Date: Mon, 23 Feb 2026 22:09:03 +0100 Subject: [PATCH 2/7] Add better comments --- .../App/Table Information/src/IndexesListPart.Page.al | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/System Application/App/Table Information/src/IndexesListPart.Page.al b/src/System Application/App/Table Information/src/IndexesListPart.Page.al index 64da96df7b..d6a744155b 100644 --- a/src/System Application/App/Table Information/src/IndexesListPart.Page.al +++ b/src/System Application/App/Table Information/src/IndexesListPart.Page.al @@ -146,7 +146,7 @@ page 8704 "Indexes List Part" BuildInMemoryList(Rec.TableId); // Rebuild the in-memory list to get the updated index status. if Rec."Metadata Defined" then - Rec.Get(RecordIDOfCurrentPosition); // Return to the same position in the list after refreshing the data. + Rec.Get(RecordIDOfCurrentPosition); // Return to the same position, not possible for non-AL defined indexes as they are removed from the underlying table. CurrPage.Update(false); end; @@ -180,7 +180,7 @@ page 8704 "Indexes List Part" Rec.DeleteAll(); // Clear the temporary table to make sure the disabled index is not shown. BuildInMemoryList(Rec.TableId); // Rebuild the in-memory list to get the updated index status. if Rec."Metadata Defined" then - Rec.Get(RecordIDOfCurrentPosition); // Return to the same position in the list after refreshing the data. + Rec.Get(RecordIDOfCurrentPosition); // Return to the same position, not possible for non-AL defined indexes as they are removed from the underlying table. CurrPage.Update(false); end; From 1ee43db183480d5102b52aca90b5fe316491035f Mon Sep 17 00:00:00 2001 From: Mads Gram Date: Tue, 24 Feb 2026 19:47:59 +0100 Subject: [PATCH 3/7] Second is Metadata check is against sytem table --- .../src/IndexesListPart.Page.al | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/src/System Application/App/Table Information/src/IndexesListPart.Page.al b/src/System Application/App/Table Information/src/IndexesListPart.Page.al index d6a744155b..cd905672f1 100644 --- a/src/System Application/App/Table Information/src/IndexesListPart.Page.al +++ b/src/System Application/App/Table Information/src/IndexesListPart.Page.al @@ -133,8 +133,11 @@ page 8704 "Indexes List Part" var IndexManagement: Codeunit "Index Management"; RecordIDOfCurrentPosition: RecordId; + IsMetadataDefined: Boolean; begin - if not Rec."Metadata Defined" then + IsMetadataDefined := Rec."Metadata Defined"; + + if not IsMetadataDefined then if not Dialog.Confirm(TurnOffIndexWarningQst) then exit; @@ -145,8 +148,8 @@ page 8704 "Indexes List Part" Rec.DeleteAll(); // Clear the temporary table to make sure the disabled index is not shown. BuildInMemoryList(Rec.TableId); // Rebuild the in-memory list to get the updated index status. - if Rec."Metadata Defined" then - Rec.Get(RecordIDOfCurrentPosition); // Return to the same position, not possible for non-AL defined indexes as they are removed from the underlying table. + if IsMetadataDefined then + if Rec.Get(RecordIDOfCurrentPosition) then; // Done to avoid throwing an error, returning to the right position is of secondary importance. CurrPage.Update(false); end; @@ -164,8 +167,11 @@ page 8704 "Indexes List Part" DatabaseIndex: Record "Database Index"; IndexManagement: Codeunit "Index Management"; RecordIDOfCurrentPosition: RecordId; + IsMetadataDefined: Boolean; begin - if not Rec."Metadata Defined" then + IsMetadataDefined := Rec."Metadata Defined"; + + if not IsMetadataDefined then if not Dialog.Confirm(TurnOffIndexWarningQst) then exit; @@ -179,8 +185,9 @@ page 8704 "Indexes List Part" Rec.DeleteAll(); // Clear the temporary table to make sure the disabled index is not shown. BuildInMemoryList(Rec.TableId); // Rebuild the in-memory list to get the updated index status. - if Rec."Metadata Defined" then - Rec.Get(RecordIDOfCurrentPosition); // Return to the same position, not possible for non-AL defined indexes as they are removed from the underlying table. + + if IsMetadataDefined then + if Rec.Get(RecordIDOfCurrentPosition) then; // Done to avoid throwing an error, returning to the right position is of secondary importance. CurrPage.Update(false); end; From 34e3f303b62545360c1730174d084e3ab47b3d0c Mon Sep 17 00:00:00 2001 From: Mads Gram Date: Tue, 24 Feb 2026 21:08:05 +0100 Subject: [PATCH 4/7] Also show Inclidedgs --- .../src/IndexDetailsFactbox.page.al | 41 +++++++++++++++++++ .../src/TableInformationCard.Page.al | 5 +++ 2 files changed, 46 insertions(+) create mode 100644 src/System Application/App/Table Information/src/IndexDetailsFactbox.page.al diff --git a/src/System Application/App/Table Information/src/IndexDetailsFactbox.page.al b/src/System Application/App/Table Information/src/IndexDetailsFactbox.page.al new file mode 100644 index 0000000000..450c42526f --- /dev/null +++ b/src/System Application/App/Table Information/src/IndexDetailsFactbox.page.al @@ -0,0 +1,41 @@ +// ------------------------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// ------------------------------------------------------------------------------------------------ + +namespace System.DataAdministration; + +using System.Diagnostics; + +page 9705 "Index Details Factbox" +{ + PageType = CardPart; + ApplicationArea = All; + UsageCategory = Administration; + SourceTable = "Database Index"; + + Editable = false; + + layout + { + area(Content) + { + group(Fields) + { + Caption = 'Index Key Fields'; + field(FieldNames; Rec."Column Names") + { + Caption = 'Fields in Index'; + ToolTip = 'Specifies the fields that are part of this index.'; + MultiLine = true; + } + field("Included Fields"; Rec."Included Fields") + { + Caption = 'Included Fields'; + ToolTip = 'Specifies the fields that are included in this index but not part of the key.'; + MultiLine = true; + } + } + } + } +} diff --git a/src/System Application/App/Table Information/src/TableInformationCard.Page.al b/src/System Application/App/Table Information/src/TableInformationCard.Page.al index d3cb524e3b..0bd9a1c75c 100644 --- a/src/System Application/App/Table Information/src/TableInformationCard.Page.al +++ b/src/System Application/App/Table Information/src/TableInformationCard.Page.al @@ -78,6 +78,11 @@ page 8705 "Table Information Card" { SubPageLink = TableId = field(ID); } + part(IndexDetails; "Index Details Factbox") + { + Provider = IndexLines; + SubPageLink = TableId = field(TableId), "Company Name" = field("Company Name"), "Source App ID" = field("Source App ID"), "Index Name" = field("Index Name"); + } } } From b8a72d0531b6bef0cdbcab82b798d8f954ed8f97 Mon Sep 17 00:00:00 2001 From: Mads Gram Date: Tue, 24 Feb 2026 21:30:34 +0100 Subject: [PATCH 5/7] fix --- ...xDetailsFactbox.page.al => IndexDetails.page.al} | 13 +++++++++---- .../Table Information/src/IndexesListPart.Page.al | 1 + .../src/TableInformationCard.Page.al | 8 +++++--- 3 files changed, 15 insertions(+), 7 deletions(-) rename src/System Application/App/Table Information/src/{IndexDetailsFactbox.page.al => IndexDetails.page.al} (87%) diff --git a/src/System Application/App/Table Information/src/IndexDetailsFactbox.page.al b/src/System Application/App/Table Information/src/IndexDetails.page.al similarity index 87% rename from src/System Application/App/Table Information/src/IndexDetailsFactbox.page.al rename to src/System Application/App/Table Information/src/IndexDetails.page.al index 450c42526f..68dd9d72cf 100644 --- a/src/System Application/App/Table Information/src/IndexDetailsFactbox.page.al +++ b/src/System Application/App/Table Information/src/IndexDetails.page.al @@ -7,14 +7,18 @@ namespace System.DataAdministration; using System.Diagnostics; -page 9705 "Index Details Factbox" +/// +/// +/// +page 9705 "Index Details" { + Caption = 'Index Details'; + PageType = CardPart; ApplicationArea = All; UsageCategory = Administration; SourceTable = "Database Index"; - - Editable = false; + Permissions = tabledata "Database Index" = r; layout { @@ -22,7 +26,8 @@ page 9705 "Index Details Factbox" { group(Fields) { - Caption = 'Index Key Fields'; + Caption = 'Key Fields'; + field(FieldNames; Rec."Column Names") { Caption = 'Fields in Index'; diff --git a/src/System Application/App/Table Information/src/IndexesListPart.Page.al b/src/System Application/App/Table Information/src/IndexesListPart.Page.al index cd905672f1..41daae2475 100644 --- a/src/System Application/App/Table Information/src/IndexesListPart.Page.al +++ b/src/System Application/App/Table Information/src/IndexesListPart.Page.al @@ -199,6 +199,7 @@ page 8704 "Indexes List Part" Image = Add; ToolTip = 'Enqueues the index to be turned on in the subsequent maintenance window.'; + trigger OnAction() var KeyRec: Record "Key"; diff --git a/src/System Application/App/Table Information/src/TableInformationCard.Page.al b/src/System Application/App/Table Information/src/TableInformationCard.Page.al index 0bd9a1c75c..3dbffb0ff3 100644 --- a/src/System Application/App/Table Information/src/TableInformationCard.Page.al +++ b/src/System Application/App/Table Information/src/TableInformationCard.Page.al @@ -73,15 +73,17 @@ page 8705 "Table Information Card" ToolTip = 'Specifies the last time the database engine was started. Index statistics are reset when SQL Server is restarted.'; } } - part(IndexLines; "Indexes List Part") { SubPageLink = TableId = field(ID); } - part(IndexDetails; "Index Details Factbox") + part(IndexDetails; "Index Details") { Provider = IndexLines; - SubPageLink = TableId = field(TableId), "Company Name" = field("Company Name"), "Source App ID" = field("Source App ID"), "Index Name" = field("Index Name"); + SubPageLink = TableId = field(TableId), + "Company Name" = field("Company Name"), + "Source App ID" = field("Source App ID"), + "Index Name" = field("Index Name"); } } } From 3189cf26d04ed36e07b1df497d9daccde1172a8b Mon Sep 17 00:00:00 2001 From: Mads Gram Date: Tue, 24 Feb 2026 21:32:13 +0100 Subject: [PATCH 6/7] Fux --- .../App/Table Information/src/IndexDetails.page.al | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/System Application/App/Table Information/src/IndexDetails.page.al b/src/System Application/App/Table Information/src/IndexDetails.page.al index 68dd9d72cf..faab8dbba4 100644 --- a/src/System Application/App/Table Information/src/IndexDetails.page.al +++ b/src/System Application/App/Table Information/src/IndexDetails.page.al @@ -8,7 +8,7 @@ namespace System.DataAdministration; using System.Diagnostics; /// -/// +/// Displays additional details for a specific index. /// page 9705 "Index Details" { From 7cf2235ac06e6e27b5b78b5da86ae9b3c5704858 Mon Sep 17 00:00:00 2001 From: Mads Gram Date: Wed, 25 Feb 2026 00:18:16 +0100 Subject: [PATCH 7/7] Add execute permission for new page --- .../permissions/TableInformationObjects.PermissionSet.al | 1 + 1 file changed, 1 insertion(+) diff --git a/src/System Application/App/Table Information/permissions/TableInformationObjects.PermissionSet.al b/src/System Application/App/Table Information/permissions/TableInformationObjects.PermissionSet.al index 8e4175954a..bf0caa51a2 100644 --- a/src/System Application/App/Table Information/permissions/TableInformationObjects.PermissionSet.al +++ b/src/System Application/App/Table Information/permissions/TableInformationObjects.PermissionSet.al @@ -15,5 +15,6 @@ permissionset 8702 "Table Information - Objects" page "Table Information Cache Part" = X, page "Table Information Card" = X, page "Indexes List Part" = X, + page "Index Details" = X, page "Table Information" = X; }