Selected / Marked records

In an AL Extension CodeUnit, how do you iterate through the records that a user has selected / marked / ticked on a list page using the ‘Select More’ functionality? For instance, is there an IsMarked / IsSelected / IsTicked property in a data-type somewhere? Or, can you pass in the already drilled-down list to the codeunit?

One method would be currpage.setselectionfilter described here:

you could then pass the record variable used for the selectionfilter into a codeunit for further processing. An example of it in action from standard BC:

ApplicationArea = Jobs;
Caption = ‘Create Job &Journal Lines’;
Image = PostOrder;
Promoted = true;
PromotedCategory = Process;
PromotedIsBig = true;
ToolTip = ‘Use a batch job to help you create sales journal lines for the involved job planning lines.’;

trigger OnAction()
JobPlanningLine: Record “Job Planning Line”;
JobJnlLine: Record “Job Journal Line”;
JobTransferLine: Codeunit “Job Transfer Line”;
JobTransferJobPlanningLine: Page “Job Transfer Job Planning Line”;
if JobTransferJobPlanningLine.RunModal = ACTION::OK then begin

if JobPlanningLine.FindSet then
JobPlanningLine, JobTransferJobPlanningLine.GetPostingDate, JobTransferJobPlanningLine.GetJobJournalTemplateName,
JobTransferJobPlanningLine.GetJobJournalBatchName, JobJnlLine);
until JobPlanningLine.Next = 0;