web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Answered

AL: Get Selected Rows from List of Temp Table

(0) ShareShare
ReportReport
Posted on by 80

Hi there,

I've got a temp table called "TempShoppingList" that's being shown to the user in a new List page. I want to be able to perform an action on items that have been selected in that list. My current action looks like:

action(RaisePO)
            {
                Caption = 'Raise PO';
                Image = "Import";
                Promoted = true;
                PromotedCategory = Process;
                ApplicationArea = All;

                trigger OnAction();
                var
                    Line: Record "TempShoppingList"; // this is the page source table
                begin
                    CurrPage.SetSelectionFilter(Line);

                    if Line.FindSet() then
                        // codeunit.DoThing(Line)
                    else
                        Message('None selected');
                    exit;
                end;
            }

However, regardless of what is selected in the UI - the message stating 'None selected' always shows. I've managed to get the above working for normal out of the box tables, but not with tempoary tables. Is there anything I'm missing? Thanks in advance

I have the same question (0)
  • sjsbls Profile Picture
    80 on at
    RE: AL: Get Selected Rows from List of Temp Table

    Ah, that makes sense. Copying works great, thanks!

  • Verified answer
    Teddy Herryanto (That NAV Guy) Profile Picture
    14,008 Super User 2025 Season 2 on at
    RE: AL: Get Selected Rows from List of Temp Table

    Because the temporary table on the page (rec) and the temporary table on the action (Line) are two different variables.

    Try using copy first.

    Line.Copy(Rec,true);

    CurrPage.SetSelectionFilter(Line);

    if Line.FindSet() then

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Mansi Soni – Community Spotlight

We are honored to recognize Mansi Soni as our August 2025 Community…

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
Sohail Ahmed Profile Picture

Sohail Ahmed 2,899 Super User 2025 Season 2

#2
Sumit Singh Profile Picture

Sumit Singh 2,444

#3
Jeffrey Bulanadi Profile Picture

Jeffrey Bulanadi 2,304

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans