Add Default descending sort on historical pages

This commit is contained in:
Teddy Herryanto 2026-06-15 06:42:09 +02:00
parent 822cae1b27
commit b520360f52
3 changed files with 82 additions and 0 deletions

View file

@ -0,0 +1,29 @@
page 50100 "Integration Log Entries"
{
PageType = List;
SourceTable = "Integration Log Entry";
ApplicationArea = All;
UsageCategory = History;
Caption = 'Integration Log Entries';
// No descending default sort: the page opens oldest-first.
layout
{
area(Content)
{
repeater(General)
{
field("Entry No."; Rec."Entry No.")
{
}
field(Status; Rec.Status)
{
}
field(Message; Rec.Message)
{
}
}
}
}
}

View file

@ -0,0 +1,30 @@
page 50100 "Integration Log Entries"
{
PageType = List;
SourceTable = "Integration Log Entry";
ApplicationArea = All;
UsageCategory = History;
Caption = 'Integration Log Entries';
// Historical pages should open with the newest records first.
SourceTableView = order(descending);
layout
{
area(Content)
{
repeater(General)
{
field("Entry No."; Rec."Entry No.")
{
}
field(Status; Rec.Status)
{
}
field(Message; Rec.Message)
{
}
}
}
}
}

View file

@ -0,0 +1,23 @@
---
bc-version: [all]
domain: ui
keywords: [historical-table, list-page, descending-sort, log-entry, ledger-entry, archive]
technologies: [al]
countries: [w1]
application-area: [all]
---
# Default descending sort on historical pages
## Description
Historical list pages should default to showing the newest records first. On pages such as log entries, ledger entries, archives, and other history lists, an oldest-first default order does not align with the primary use of the page, which is typically to review recent activity.
## Best Practice
Set descending sort as the default on list pages whose primary purpose is to present historical records. This is the expected default for entry, log, archive, and posted-history pages unless there is a specific requirement to begin with the oldest record.
See sample: `default-descending-sort-on-historical-pages.good.al`.
## Anti Pattern
Using an oldest-first default order on a historical list page where users are primarily interested in recent activity. Typical signs include history, log, or entry pages that regularly need to be re-sorted to descending during normal use.
See sample: `default-descending-sort-on-historical-pages.bad.al`.