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

Announcements

No record found.

News and Announcements icon
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)
  • Verified answer
    Teddy Herryanto (That NAV Guy) Profile Picture
    14,304 Super User 2026 Season 1 on at

    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

  • sjsbls Profile Picture
    80 on at

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

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the March Top 10 Community Leaders

These are the community rock stars!

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

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 2,028 Super User 2026 Season 1

#2
YUN ZHU Profile Picture

YUN ZHU 1,121 Super User 2026 Season 1

#3
Teagen Boll Profile Picture

Teagen Boll 669 Super User 2026 Season 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans