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...
Answered

Copy records from one table to another

(0) ShareShare
ReportReport
Posted on by 700

Hi All,

I have two tables - Employee and Resource.

From the Employee table, I have to copy some fields(records) to the Resource table for the corresponding Employee.

The fields are - Employment Type, Date of Birth and Nationality.

How to achieve this ? I tried some ways but didn't get the result.

Please suggest.

  • Community Member Profile Picture
    on at

    Through the user interface, or in code?

    If I recall correctly, there is some relationship mapping in the HR module for this...

  • Dynamics 365 Business Central Profile Picture
    700 on at

    In code

  • Verified answer
    Francisco Bedolla Profile Picture
    1,125 on at

    something like

    employee.reset;

    if employee.findfirst then

     repeat

       resource,reset;

       resource,setrange("no.",employee.no.)

       if resource.findset then begin

         resource.field := employee.field;//here you can put the fields that you want to be copied

         resource.modify(true);

       end;

     until employee.next=0;

  • Dynamics 365 Business Central Profile Picture
    700 on at

    In which trigger we have to put this code... And on which table

  • Francisco Bedolla Profile Picture
    1,125 on at

    that depends on what you are trying to achieve, that is copied in each creation and / or modification of data or by a manual action, or in a job

  • Teddy Herryanto (That NAV Guy) Profile Picture
    14,306 Super User 2026 Season 1 on at

    You need to give me more detail on what you are trying to do. How, when, why

  • Dynamics 365 Business Central Profile Picture
    700 on at

    I tried your code for Employee No. and Resource No. fields. But it is not working.

  • Dynamics 365 Business Central Profile Picture
    700 on at

    On the List Part page I created, I want to display the Employee No. (from Employee table) in place of Resource No. (from Resource table).

    Requirement - Displaying the employees for which 'Time Sheet Approver user ID' is same as the logged in user ID. Data is displayed from both tables. Just wanna replace Resource No. with the corresponding Employee No.

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

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

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 795 Super User 2026 Season 2

#2
YUN ZHU Profile Picture

YUN ZHU 561 Super User 2026 Season 2

#3
Grigorios Mavrogeorgis Profile Picture

Grigorios Mavrogeorgis 323 Super User 2026 Season 2

Last 30 days Overall leaderboard

Featured topics

Microsoft Training Manuals

Product updates

Dynamics 365 release plans