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...
Suggested Answer

Displaying temp data on list

(1) ShareShare
ReportReport
Posted on by 20

Hello

i want to populate a temp table and display it in a page, how can i do ?

here is my code

table 50999 TempProduit
{
    TableType = Temporary;

    fields
    {
        field(1; "Item No."; Code[20])
        {
            caption = 'Item No.';
            TableRelation = Item."No.";
            ValidateTableRelation = false;

            trigger OnValidate()
            var
                recItem: Record item;
            begin
                recItem.Get("Item No.");
                Description := recItem.Description;
            end;
        }
        field(2; "Description"; Text[100])
        {
            Caption = 'Description';
        }
        field(3; "Quantity (base)"; Integer)
        {
            Caption = 'Quantity (Base)';
        }
        field(4; "Unit Price"; decimal)
        {
            Caption = 'Unit Price';
        }
    }
    keys
    {
        key(key1; "Item No.")
        {
        }
    }
}

and the page

page 50091 "auto order"
{
    Caption = 'auto order';
    PageType = list;
    UsageCategory = Lists;
    SourceTable = TempProduit;
    SourceTableTemporary = true;

    layout
    {
        area(content)
        {
            group(General)
            {
            }

            repeater(Produit)
            {
                field("Item No."; "Item No.")
                {

                }
                field(Descripion; Description)
                {

                }
                field("Quantity (base)"; "Quantity (base)")
                {

                }
                field("Unit Price"; "Unit Price")
                {

                }
            }
        }
    }
    actions
    {
        area(Processing)
        {
            action(Populate)
            {
                ApplicationArea = All;
                Caption = 'Populate';

                trigger OnAction()
                var
                    recTempProduit: Record TempProduit;
                begin

                    currpage.SetRecord(recTempProduit);

                    recTempProduit.Init();
                    recTempProduit.Validate("Item No.", '115915');
                    recTempProduit."Quantity (base)" := 10;
                    recTempProduit.Insert();

                    CurrPage.Update(false);


                end;
            }

        }
    }
}

I have the same question (0)
  • Suggested answer
    Mohana Yadav Profile Picture
    61,186 Super User 2026 Season 1 on at

    Did you try

                       rec.Init();

                       rec.Validate("Item No.", '115915');

                       rec."Quantity (base)" := 10;

                       rec.Insert();

  • TiamaT Profile Picture
    20 on at

    yes that's it !!

    thank you !

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!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

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

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 1,857 Super User 2026 Season 1

#2
YUN ZHU Profile Picture

YUN ZHU 1,047 Super User 2026 Season 1

#3
Dhiren Nagar Profile Picture

Dhiren Nagar 959 Super User 2026 Season 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans