Dynamics 365 Business Central: How to note the records that the user has selected on the Subpage/Lines (Page.SetSelectionFilter in part)
Page.SetSelectionFilter is a method that captures records selected by users on pages or subpages, marks them in the table, and applies a filter. The post explains how to use it both on main pages by accessing subpages via CurrPage and directly on subpage extensions.

post Dynamics 365 Lab
"CurrPage.SalesLines.Page.SetSelectionFilter(Salesline);"
Key points
- Page.SetSelectionFilter(var Record) gets user-selected records and applies a ‘marked only’ filter
- On main pages, access subpage selections using CurrPage.{SubpageName}.Page.SetSelectionFilter()
- On subpage extensions, use CurrPage.SetSelectionFilter() directly like normal page usage
- The method marks selected records in the specified table for processing
Quotes
- “CurrPage.SalesLines.Page.SetSelectionFilter(Salesline);” (Shows the exact syntax for accessing selections on a subpage from the main page, a key practical technique)
AL objects mentioned
As named in the post. A name that matches one object page by exact type and name links to it; the others stay as named.
Possibly related
No source states these links: they share an object, a model read them, or a person found the same subject.
- BC Friday Tips #56 Understand Missing Fields in Copy Documents — possibly related: both name Table 37 “Sales Line”
- BC Friday Tips #84 Why Is Your Item Missing from the Sales Line Lookup? — possibly related: both name Table 37 “Sales Line”
- Business Central Development Serie - Part 2b: AI for BC Development — The Knowledge Gap That Ships to Production — possibly related: both name Table 37 “Sales Line”
- Business Central Under the Hood episode 14: Building Agents in Business Central — possibly related: both name Page 42 “Sales Order”
- Create Purchase Orders from Drop Shipments — possibly related: both name Page 42 “Sales Order”
- Directions EMEA 2023 Keynote: Business Central saves time for consultants and power users — possibly related: both name Page 42 “Sales Order”
- Dynamics 365 Business Central Blog Series: Item Attributes — possibly related: both name Page 42 “Sales Order”
- Dynamics 365 Business Central: About the size of the value displayed on the card/document page (textbox too small to read?) — possibly related: both name Page 42 “Sales Order”
- Dynamics 365 Business Central: Add a Scan Barcode action and scan multiple/Continious scanning (Invoke barcode scanning programmatically from AL) — possibly related: both name Table 37 “Sales Line”
- Dynamics 365 Business Central: Adding comments to Factbox/Report (Displaying Comments in a FactBox/Report) — possibly related: both name Page 42 “Sales Order”
Context
- Features: Page.SetSelectionFilter method, subpage selection handling, record filtering, marked records
Source: Dynamics 365 Lab - Yun Zhu, community blog. Summary, key points and quotes are derived (CONTENT-NOTICE.md); read the original for the full text.