Skip to main content

Notifications

Announcements

No record found.

Business Central forum
Suggested answer

How create New DataTable It contains (3 couloms)

Posted on by 65

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;


 
        }
    }
 
}
 
 
 
 
 

 

 

Categories:
  • 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
    YUN ZHU 68,757 Super User 2024 Season 2 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
    Ariba Mehdi 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:

Helpful resources

Quick Links

Dynamics 365 Community Update – Sep 16th

Welcome to the next edition of the Community Platform Update. This is a weekly…

Announcing Our 2024 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 290,349 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 228,212 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans