Copy data from Temp Table

Hi there,

This should be quite easy but I'm having trouble in doing it.

I copied data to a Temp Table with a primary key and added Fields.

Now I want to transfer that data back to the original table since that data was lost in the upgrade.

I just want to transfer the fields with the same key number to the original table

    local procedure TempCustomer_DataCopy()
    var
        DestinyTable: Record Customer;
        OriginTable: Record "Customer Temp";
    begin
        With OriginTable do begin
            if FindSet() then
                repeat
                    DestinyTable.Init();
                    DestinyTable.Transferfields(originTable);
                    DestinyTable.Insert;
                until next = 0;
        end;
    end;

Related
Recommended