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 to insert record from one page to another page through action button in business central

(1) ShareShare
ReportReport
Posted on by 164
how to insert record from one page to another page  through action button in business central al for multiple lines
  • Suggested answer
    YUN ZHU Profile Picture
    78,959 Super User 2025 Season 1 on at
    how to insert record from one page to another page through action button in business central
    Hi, if you are referring to passing the value when opening the page from the action, there is a simple example in the following post, I hope it can give you some tips.
     
     
    Thanks.
    ZHU
  • Suggested answer
    Shathika Karunaratne Profile Picture
    on at
    how to insert record from one page to another page through action button in business central
    Hi,
     
    Before opening the page you can create a global procedure in the new page to set variable values.
    Then you can make it as a filter before assigning SetTableView procedure.
  • Suggested answer
    Nitin Verma Profile Picture
    21,405 Moderator on at
    how to insert record from one page to another page through action button in business central
    Hi,
     
    You can take idea by using below example.
     
    pageextension 50100 "Source Page Ext" extends "Source Page"
    {
        actions
        {
            addafter(ActionItems)
            {
                action(InsertRecordsAction)
                {
                    ApplicationArea = All;
    
                    trigger OnAction()
                    begin
                        InsertRecordsFunction();
                    end;
                }
                {
                    Image = InsertRecords;
                    Caption = 'Insert Records';
                }
            }
        }
    }
    
    codeunit 50100 "Source Page Codeunit"
    {
        procedure InsertRecordsFunction()
        var
            SourcePageRecord: Record "Source Table";
            DestinationPageRecord: Record "Destination Table";
        begin
            SourcePageRecord.RESET;
            SourcePageRecord.SETRANGE("Field", 'FilterValue');
    
            IF SourcePageRecord.FINDSET THEN
            BEGIN
                REPEAT
                    DestinationPageRecord.INIT;
                    DestinationPageRecord."Field" := SourcePageRecord."Field";
                    DestinationPageRecord.INSERT;
                UNTIL SourcePageRecord.NEXT = 0;
            END;
        end;
    }
    
     

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

Daivat Vartak – Community Spotlight

We are honored to recognize Daivat Vartak as our March 2025 Community…

Announcing Our 2025 Season 1 Super Users!

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

Kudos to the February Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 293,001 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,837 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156 Moderator

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans