Point lookups at a dedicated lookup page, not the full list
A TableRelation lookup opens the table's LookupPageId. If that is the full list page, the lookup runs that page's triggers, FactBoxes, and calculated fields even though the dropdown never shows them. The base application added dedicated Customer, Vendor, and Item lookup pages for this reason.
- microsoftlayer
- performancedomain
- 2examples
- 2pull requests
Rule on GitHub · microsoft layer · performance · BC all · tier official · derived
Contributions welcome — open a PR to refine or extend this article.
Description
A TableRelation lookup opens the table’s LookupPageId. If that is the full list page, the lookup runs that page’s triggers, FactBoxes, and calculated fields even though the dropdown never shows them. The base application added dedicated Customer, Vendor, and Item lookup pages for this reason. Agents set LookupPageId to the main list because it already exists.
Best Practice
Give master tables a slim lookup page (PageType = List, few columns, no FactBoxes, no heavy OnAfterGetRecord) and assign it to LookupPageId. Keep the full list for DrillDownPageId and the role-explorer entry.
See sample: use-dedicated-lookup-pages-not-full-lists.good.al.
Anti Pattern
LookupPageId = Page::"... List" on a table that already has (or should have) a lookup page. Opening a field lookup then pays list-page cost. The signal is LookupPageId pointing at a page that declares FactBoxes or a wide repeater.
See sample: use-dedicated-lookup-pages-not-full-lists.bad.al.
Examples
- Good: use-dedicated-lookup-pages-not-full-lists.good.al
- Bad: use-dedicated-lookup-pages-not-full-lists.bad.al
Changed by
- #174 Make BCQuality documentation easier for partners to get started, 2026-09-09
- #153 Promote knowledge for Microsoft-owned review skills, 2026-09-03
From microsoft/BCQuality at a4593a1, MIT License, Copyright (c) 2026 Microsoft Corporation (license).