Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
// ------------------------------------------------------------------------------------------------
// 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;

/// <summary>
/// Displays additional details for a specific index.
/// </summary>
page 9705 "Index Details"
{
Caption = 'Index Details';

PageType = CardPart;
ApplicationArea = All;
UsageCategory = Administration;
SourceTable = "Database Index";
Permissions = tabledata "Database Index" = r;

layout
{
area(Content)
{
group(Fields)
{
Caption = '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;
}
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -144,7 +147,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 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;
Expand All @@ -162,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;

Expand All @@ -177,7 +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.
Rec.Get(RecordIDOfCurrentPosition); // Return to the same position in the list after refreshing the data.

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;
Expand All @@ -189,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";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,18 @@ 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")
{
Provider = IndexLines;
SubPageLink = TableId = field(TableId),
"Company Name" = field("Company Name"),
"Source App ID" = field("Source App ID"),
"Index Name" = field("Index Name");
}
}
}

Expand Down
Loading