building-cue-rolecenters
Skill1 starsChanged 10 months agoMITView on GitHub
Builds Cue tiles and Activities CardPart pages for Business Central Role Centers, creates FlowField tables with CalcFormula counts, and implements drill-down navigation. Use when adding KPI dashboards, displaying record statistics, creating status indicators, or extending existing Role Centers with custom activity tiles.
In this repository12 other files it gives its agents.
- AGENTS.mdAGENTS.md
- authenticating-with-oauthSkill
- binding-event-subscribersSkill
- consuming-bc-standard-apiSkill
- controlling-al-accessSkill
- creating-bc-custom-apiSkill
- handling-bc-filesSkill
- implementing-al-interfacesSkill
- implementing-telemetrySkill
- integrating-azure-servicesSkill
- optimizing-bc-performanceSkill
- writing-git-commitsSkill
The file
We split this skill into the rules it gives an agent
3 rules. About 0 are common, 2 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 158
Add your Activities page to an existing Role Center.
- Very specific: line 162
Use addafter or addbefore for positioning
- Distinctive: line 163
Add actions to Sections and/or Creation areas
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Skill: AL Cue and Role Center Activities
Validation Gates
- After Step 1: Cue table compiles, FlowFields calculate correct counts
- After Step 2: Activities page displays tiles, OnDrillDown navigates correctly
- Final: Page extension adds part to Role Center, styles render as expected
Prerequisites: Identify source tables, filter criteria, and target Role Center (e.g., Order Processor 9006, Accountant 9027).
Architecture: Role Center Page → Activities CardPart (CueGroups) → Cue Table (FlowFields with CalcFormula counts)
Procedure
Step 1: Create Cue Table
The Cue Table contains FlowFields that calculate counts from source records.
Key patterns:
- Single Primary Key field (Code[10])
- FlowFields with
CalcFormula = count(...) - Editable = false on all FlowFields
- FieldClass = FlowField
table <ID> "<PREFIX> <Area> Cue"
{
Caption = '<Area> Cue';
DataClassification = CustomerContent;
fields
{
field(1; "Primary Key"; Code[10])
{
Caption = 'Primary Key';
DataClassification = SystemMetadata;
}
field(10; "<Status1> <Records>"; Integer)
{
CalcFormula = count("<Source Table>" where(
"<FilterField1>" = const(<Value1>),
"<StatusField>" = const(<Status1>)));
Caption = '<Status1> <Records>';
ToolTip = 'Number of <records> with status <Status1>';
Editable = false;
FieldClass = FlowField;
}
field(20; "<Status2> <Records>"; Integer)
{
CalcFormula = count("<Source Table>" where(
"<FilterField1>" = const(<Value1>),
"<StatusField>" = const(<Status2>)));
Caption = '<Status2> <Records>';
ToolTip = 'Number of <records> with status <Status2>';
Editable = false;
FieldClass = FlowField;
}
// Add more cue fields as needed...
}
keys
{
key(PK; "Primary Key")
{
Clustered = true;
}
}
}Step 2: Create Activities Page (CardPart)
The Activities page displays the cue tiles and handles drill-down navigation.
Key patterns:
- PageType = CardPart
- RefreshOnActivate = true (updates counts when user returns to RC)
- CueGroup for tile grouping
- OnDrillDown triggers for navigation
- Style property for visual emphasis
page <ID> "<PREFIX> <Area> Activities"
{
Caption = '<Area>';
PageType = CardPart;
RefreshOnActivate = true;
SourceTable = "<PREFIX> <Area> Cue";
layout
{
area(content)
{
cuegroup(<GroupName>)
{
Caption = '<Group Title>';
field("<Field1>"; Rec."<Field1>")
{
ApplicationArea = All;
DrillDownPageID = "<Target List Page>";
ToolTip = '<Tooltip>';
trigger OnDrillDown()
var
SourceRec: Record "<Source Table>";
begin
SourceRec.SetRange("<FilterField1>", <Value1>);
SourceRec.SetRange("<StatusField>", <StatusValue>);
Page.Run(Page::"<Target List Page>", SourceRec);
end;
}
field("<Field2>"; Rec."<Field2>")
{
ApplicationArea = All;
DrillDownPageID = "<Target List Page>";
ToolTip = '<Tooltip>';
Style = Attention; // Yellow highlight
trigger OnDrillDown()
// ... similar pattern
}
field("<Field3>"; Rec."<Field3>")
{
ApplicationArea = All;
Style = Favorable; // Green highlight
// ...
}
}
}
}
trigger OnOpenPage()
begin
Rec.Reset();
if not Rec.Get() then begin
Rec.Init();
Rec.Insert();
end;
end;
}Step 3: Extend Role Center
Add your Activities page to an existing Role Center.
Key patterns:
- Find the correct anchor control (use F12 to explore Base App RC)
- Use
addafteroraddbeforefor positioning - Add actions to Sections and/or Creation areas
pageextension <ID> "<PREFIX> <RoleCenterName> Ext" extends "<RoleCenterPageName>"
{
layout
{
addafter(<ExistingControlName>)
{
part("<PREFIX> <Area> Activities"; "<PREFIX> <Area> Activities")
{
ApplicationArea = All;
Caption = '<Area>';
}
}
}
actions
{
addlast(Sections)
{
group(<PREFIX><Area>Section)
{
Caption = '<Area>';
Image = Setup;
action(<PREFIX><Action1>)
{
Caption = '<Action Title>';
ApplicationArea = All;
ToolTip = '<Tooltip>';
RunObject = Page "<Target Page>";
}
}
}
}
}Quick Reference
Cue Styles: Attention (yellow), Favorable (green), Unfavorable (red), Subordinate (gray), Ambiguous (orange)
Common Role Centers: Order Processor (9006), Accountant (9027), Business Manager (9022), Sales Manager (9005), Purchasing Agent (9007)
Best Practices: Efficient CalcFormula filters • OnDrillDown must match CalcFormula filters • Single record table (Primary Key = '') • RefreshOnActivate = true
References
See references/ folder for:
cue-patterns.md- Complete code examples
External Documentation
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

