{"title":"RequestPage.SetSelectionFilter(var Record) Method","url":"https://jonas-paprotka.de/docs/dev-itpro/developer/methods-auto/requestpage/requestpage-setselectionfilter-method/","by":"JOP-AL","license":"Copyright (c) Microsoft Corporation. CC BY 4.0, https://creativecommons.org/licenses/by/4.0/; code samples MIT. From https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/methods-auto/requestpage/requestpage-setselectionfilter-method, MicrosoftDocs/dynamics365smb-devitpro-pb at 828b6ee (2026-11-19). Changed: includes filled in, links to this site, and for agents shortened without dropping a fact.","credit":"Microsoft Corporation, CC BY 4.0","origin":"https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/methods-auto/requestpage/requestpage-setselectionfilter-method","source":{"name":"Business Central developer and IT pro docs","repo":"https://github.com/MicrosoftDocs/dynamics365smb-devitpro-pb","commit":"828b6ee72fcd75755627cd6011f3d20899217ab2","date":"2026-11-19"},"checked":"2026-11-19","description":"Notes the records that the user has selected on the request page, marks those records in the table specified, and sets the filter to marked only.","date":"2026-10-01","meta":{"topic":"reference"},"outline":[{"level":1,"title":"RequestPage.SetSelectionFilter(var Record) Method","slug":"requestpagesetselectionfiltervar-record-method","at":0,"chars":1323},{"level":2,"title":"Syntax","slug":"syntax","at":260,"chars":72},{"level":2,"title":"Parameters","slug":"parameters","at":332,"chars":146},{"level":2,"title":"Remarks","slug":"remarks","at":478,"chars":706},{"level":2,"title":"Related information","slug":"related-information","at":1184,"chars":139}],"text":"# RequestPage.SetSelectionFilter(var Record) Method\n> Version: _Available or changed with runtime version 1.0._\nNotes the records that the user has selected on the request page, marks those records in the table specified, and sets the filter to \"marked only\".\n## Syntax\n```al\n RequestPage.SetSelectionFilter(var Record: Record)\n```\n## Parameters\nRequestPage\nType: requestpage-data-type\nAn instance of the requestpage-data-type data type.\nRecord\nType: ../record/record-data-type\n## Remarks\nIf all records are selected, marks will not be used.\nIf only the current record is selected on the page, then SetSelectionFilter does the following:\n Sets the current filter group to 0 on the destination record\n Adds filters on the primary key fields that point to the current record of the page\nIf more than one record is selected on the page, then SetSelectionFilter does the following:\n Copies the current key from the page source table to the destination record\n Copies the current sort order from the table to the destination record\n Copies the current filters that are set in all filter groups\n Copies the current filter group\n Marks the selected records and sets the \"marked only\" filter\n## Related information\nrequestpage-data-type\nGet Started with AL<../../devenv-get-started>\nDeveloping Extensions<../../devenv-dev-overview>"}