Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

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

How create New DataTable It contains (3 couloms)

(0) ShareShare
ReportReport
Posted on by 4

Hi ,,,,, How create New DataTable It contains (1 couloms) and

How do copy the contents of 1 fields (Rec./No./ ) value in the header (Sales Header) table to the New data table in

in AL Business Central 

===========================================================

pageextension 50100 /Sales Order Ext/ extends /Sales Order/
{
    actions
    {
        modify(Post)
        {
            Trigger OnAfterAction()
            var
  SalesHeaderRec: Record /Sales Header/;
                SalesLineRec: Record /Sales Line/;
            begin
Message('Hello from Posted! 1');
 
                CLEAR(SalesHeaderRec);
                CLEAR(SalesLineRec);
 
                SalesHeaderRec.SETFILTER(/No./, Rec./No./);
                SalesHeaderRec.FINDFIRST;
               
                Message('InvoiceID: %1', Rec./No./);
 
end;


 
        }
    }
 
}
 
 
 
 
 

 

 

  • Community member Profile Picture
    2 on at
    How create New DataTable It contains (3 couloms)
    Creating a new DataTable in AL Business Central with one column is done using the 'TableData' type. To copy the 'Rec./No./' field from the 'Sales Header' table  to the new DataTable, you can use a loop to fetch the values and populate the new table. Utilize functions like 'ADD' or 'MODIFY' for efficient data transfer. If you need specific code snippets or guidance,
  • Suggested answer
    YUN ZHU Profile Picture
    85,670 Super User 2025 Season 1 on at
    How create New DataTable It contains (3 couloms)
    Do you want to create a lookup feature? Select data in your new table?
    Hope the following helps.
     
    Thanks.
    ZHU
  • Ariba Mehdi Profile Picture
    160 on at
    How create New DataTable It contains (3 couloms)
    Hi there,

    I am not sure if I understand this but let me assist you with my understanding of the problem.
    If you want to create a new table with 3 columns, follow the link below:

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

Ramesh Kumar – Community Spotlight

We are honored to recognize Ramesh Kumar as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

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

#1
Sohail Ahmed Profile Picture

Sohail Ahmed 2,655

#2
Mansi Soni Profile Picture

Mansi Soni 1,574

#3
YUN ZHU Profile Picture

YUN ZHU 1,453 Super User 2025 Season 1

Featured topics

Product updates

Dynamics 365 release plans