Thursday, May 15, 2014

Copy data from one dropped table to another

// Copy data from one dropped table to another
static void EmployeeDetailsCopyTableData(Args _args)
{
    EmployeeDetails      employeeDetails; // Table From Copying
    CopyOfEmployeeDetails copyOfEmployeeDetails; // Duplicated Table want to copy data from base table
    ;

    ttsBegin;
    // Clear the data from the copy table
    delete_from copyOfEmployeeDetails;

    while select employeeDetails
    {
        buf2Buf(employeeDetails, copyOfEmployeeDetails);
        copyOfEmployeeDetails.insert();
    }
 
    ttsCommit;
}

No comments:

Post a Comment

Convert Call stack to readable format in D365FO X++

//Input --container _xppCallStack = xSession::xppCallStack();  Public static str POL_formatXppCallStack(container _xppCallStack, int _skipFr...