CurrPage.SetSelectionFilter not work after sort by Descending
CurrPage.SetSelectionFilter not work after sort by Descending
Steps and to reproduce the behavior:
- I created pageextension for Sales Order List and AL code as below:
pageextension 50102 extSalesOrderList extends "Sales Order List"
{
actions
{
modify(Post)
{
trigger OnBeforeAction()
begin
nodCheckSelectedDocuments();
end;
}
}
var
nodSelectedList: List of [Text];
local procedure nodCheckSelectedDocuments()
var
markedCount: Integer;
selectedCount: Integer;
allCount: Integer;
recCount: Integer;
soList: Record "Sales Header";
begin
Clear(nodSelectedList);
Clear(soList);
soList.SetRange("Document Type", soList."Document Type"::Order);
if soList.FindSet() then begin
allCount := Rec.Count;
CurrPage.SetSelectionFilter(soList);
selectedCount := soList.Count;
repeat
if soList.Mark() then
nodSelectedList.Add(soList."No.");
UNTIL soList.Next() = 0;
end;
end;
}
- Open Sales Order List page and make "SELL-TO CUSTOMER NO." column in descending order like following screenshot.

And then select more than one records. After that click Post button and execute my procedure to get selected records but failure. It seems CurrPage.SetSelectionFilter doesn't work.
Could anyone please help me to look into this? Is AL's existing bug?
- AL Language: 3.0.168874
- Business Central: 14.0.29537.31808-US
@monchangg have you tried this sample on the latest preview?
@atoader No, is there no this issue with the latest preview release?
@monchangg if this does not reproduce in the latest release, you will have to open a request for hotfix through the standard channel.
@atoader I tested on latest preview release, it can reproduce this issue.
Looks like a candidate for a Request for Hotfix.
I just encountered pretty much the same problem. Has there been a fix made for this? @kalberes