web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

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

Fill table via Visual Studio

(0) ShareShare
ReportReport
Posted on by 5

Hello dear forum,
I've been working on a project for the university for a long time. I have to fill a table via Visual Studio with the information of another already given table. Unfortunately, I don't know how to do that. I would be happy if you could help.

Kind regards
Danny

I have the same question (0)
  • Suggested answer
    pankaj.k Profile Picture
    1,020 on at

    Hi Densonx21

    Please check the below link that will help you to insert data in new table.

    https://learn.microsoft.com/en-US/dynamics365/business-central/dev-itpro/administration/set-up-standard-company-configuration-packages

    https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/devenv-extension-install-code

    Have a great day!

    Don't forget to help the community by verifying the answer if your question has been answered. It will let others know that the topic has verified answer.

    Thanks,

    Contact Info: kuwalpankaj97@gmail.com  

  • Suggested answer
    DAnny3211 Profile Picture
    11,423 Super User 2026 Season 1 on at
    hi
    try this 
    local procedure InsertSyncTableLoop()
        var
            SourceTable: Record SourceTable;
            SyncTable: Record "Sync Table";
        begin
            if SourceTable.FindFirst() then
                repeat
                    SyncTable.Init();
                    SyncTable."Primary Key" := SourceTable."Primary Key";
                    SyncTable.D1 := SourceTable.S1;
                    SyncTable.D2 := SourceTable.S2;
                    SyncTable.D3 := SourceTable.S3;
                    SyncTable.Insert();
                until SourceTable.next = 0;
        end;
    check my answer if it helped you, thanks
    DAniele
  • Suggested answer
    YUN ZHU Profile Picture
    102,079 Super User 2026 Season 1 on at

    Hi, If you mean to insert values, you can use Record.Insert() Method.

    https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/methods-auto/record/record-insert--method

    pastedimage1670804676361v1.png

    Hope this helps as well.

    Thanks.

    ZHU

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 Launch!

Jump in, show your community spirit, and win prizes!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders

These are the community rock stars!

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

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 1,713 Super User 2026 Season 1

#2
YUN ZHU Profile Picture

YUN ZHU 1,032 Super User 2026 Season 1

#3
Grigorios Mavrogeorgis Profile Picture

Grigorios Mavrogeorgis 914 Super User 2026 Season 1

Last 30 days Overall leaderboard

Featured topics

Microsoft Training Manuals

Product updates

Dynamics 365 release plans