copy the data of one table to another same table

i have two same entity but in different in module  at run time i want to copy the data of that module how can i  achieve this 
1 answers



Their are a few ways to move your data from one table to another. The safest way I would recommend is quickly build a button with a microflow that retrieves the data from table A. Create a empty list for table B objects and loop through table A. In the loop create table B objects, populate the table B object with the values from table A object in the loop and then add the table B object to the list that is outside the loop. After the loop commit the table B list. 


With that you are done moving your data and no risk of errors or breaking your data.