Design & UI
skill-pages
AL page design patterns for Business Central. Use when creating Card, List, ListPart, Document pages, implementing page extensions, or designing UX layouts.
javiarmesto · Static checks on file
Installation
Read the source and dependencies before running a command. Copying does not install or execute anything.
npx skills add javiarmesto/ALDC-AL-Development-Collection --skill skill-pagesAbout this skill
name: skill-pages description: AL page design patterns for Business Central. Use when creating Card, List, ListPart, Document pages, implementing page extensions, or designing UX layouts.
Skill: AL Page Design
Purpose
Design and customize Business Central pages: Card, List, Document, Worksheet, and RoleCenter page types, page extensions with addafter/addbefore/modify, dynamic UI (visibility, styling), FastTab layout, promoted actions, and FactBoxes.
When to Load
This skill should be loaded when:
- Creating a new page (any type) for a custom or extended table
- Extending a standard BC page with custom fields, groups, or actions
- Designing a Document page with header-lines structure
- Implementing dynamic visibility, conditional styling, or field importance
- Optimizing page performance (FlowField limits, lazy loading)
Core Patterns
Pattern 1: Card Page
Single-record display with FastTab groups:
page 50100 "Contoso Project Card"
{
PageType = Card;
SourceTable = "Contoso Project";
Caption = 'Project Card';
UsageCategory = None; // accessed from list, not search
layout
{
area(Content)
{
group(General)
{
Caption = 'General';
field("No."; Rec."No.")
{
ApplicationArea = All;
Importance = Promoted; // visible in collapsed FastTab
}
field(Description; Rec.Description)
{
ApplicationArea = All;
Importance = Promoted;
}
field(Status; Rec.Status)
{
ApplicationArea = All;
StyleExpr = StatusStyleExpr;
}
field("Starting Date"; Rec."Starting Date")
{
ApplicationArea = All;
}
}
group(Details)
{
Caption = 'Details';
Visible = DetailsVisible; // dynamic visibility
field("Project Manager"; Rec."Project Manager")
{
ApplicationArea = All;
}
field(Budget; Rec.Budget)
{
ApplicationArea = All;
}
}
}
area(FactBoxes)
{
systempart(Notes; Notes) { ApplicationArea = All; }
systempart(Links; Links) { ApplicationArea = All; }
}
}
actions
{
area(Processing)
{
action(Release)
{
ApplicationArea = All;
Caption = 'Release';
Image = ReleaseDoc;
Promoted = true;
PromotedCategory = Process;
PromotedIsBig = true;
trigger OnAction()
begin
Rec.TestField(Status, Rec.Status::Open);
Rec.Validate(Status, Rec.Status::Released);
Rec.Modify(true);
end;
}
}
area(Navigation)
{
action(Entries)
{
ApplicationArea = All;
Caption = 'Ledger Entries';
Image = LedgerEntries;
RunObject = page "Contoso Project Entries";
RunPageLink = "Project No." = field("No.");
}
}
}
var
StatusStyleExpr: Text;
DetailsVisible: Boolean;
trigger OnAfterGetRecord()
begin
StatusStyleExpr := GetStatusStyle();
DetailsVisible := Rec.Status <> Rec.Status::Open;
end;
local procedure GetStatusStyle(): Text
begin
case Rec.Status of
Rec.Status::Open:
exit('Standard');
Rec.Status::Released:
exit('Favorable');
Rec.Status::Closed:
exit('Subordinate');
end;
end;
}
Pattern 2: List Page
Multi-record display with filters and navigation:
page 50101 "Contoso Project List"
{
PageType = List;
SourceTable = "Contoso Project";
Caption = 'Projects';
UsageCategory = Lists;
ApplicationArea = All;
CardPageId = "Contoso Project Card";
Editable = false;
layout
{
area(Content)
{
repeater(Group)
{
field("No."; Rec."No.") { ApplicationArea = All; }
field(Description; Rec.Description) { ApplicationArea = All; }
field(Status; Rec.Status)
{
ApplicationArea = All;
StyleExpr = StatusStyleExpr;
}
field("Starting Date"; Rec."Starting Date") { ApplicationArea = All; }
// Limit FlowFields on list pages — max 3-4 for performance
field("Total Budget"; Rec."Total Budget") { ApplicationArea = All; }
}
}
}
var
StatusStyleExpr: Text;
trigger OnAfterGetRecord()
begin
StatusStyleExpr := GetStatusStyle();
end;
}
List page rules:
- Set
Editable = false— use Card for editing - Set
CardPageIdfor drill-down navigation - Limit FlowFields to 3-4 maximum (each triggers a query per row)
- Use
UsageCategory = Listsfor search/Tell Me discoverability
Pattern 3: Document Page (Header + Lines)
page 50102 "Contoso Sales Document"
{
PageType = Document;
SourceTable = "Contoso Document Header";
Caption = 'Sales Document';
layout
{
area(Content)
{
group(General)
{
Caption = 'General';
field("No."; Rec."No.") { ApplicationArea = All; }
field("Customer No."; Rec."Customer No.")
{
ApplicationArea = All;
Importance = Prom
Read the complete source ↗