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

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;


 
        }
    }
 
}
 
 
 
 
 

 

 

  • Ariba Mehdi Profile Picture
    166 on at
    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:
  • Suggested answer
    YUN ZHU Profile Picture
    103,227 Super User 2026 Season 2 on at
    Do you want to create a lookup feature? Select data in your new table?
    Hope the following helps.
     
    Thanks.
    ZHU
  • CU27040901-11 Profile Picture
    2 on at
    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,

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the August Top 10 Community Leaders

These are the community rock stars!

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

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 739 Super User 2026 Season 2

#2
YUN ZHU Profile Picture

YUN ZHU 462 Super User 2026 Season 2

#3
AndrewThomas81 Profile Picture

AndrewThomas81 406 Super User 2026 Season 2

Last 30 days Overall leaderboard

Featured topics

Microsoft Training Manuals

Product updates

Dynamics 365 release plans