17 February 2017

AX 2012 RecordInsertList || how to insert set of records in a single database call in AX 2012

RecordInsertList            insertRecords;
SalesTable                     salesTable;

insertRecords           = new RecordInsertList(tableNum(SalesTradeOverEstTmp)); // Define the Table to insert

while select salesTable
{
salesTradeOverEstTmp.salesId = salesTable.salesId;
salesTradeOverEstTmp.CustAccount salesTable.CustAccount;

insertRecords.add(salesTradeOverEstTmp);
}

insertRecords.insertDatabase();

No comments:

Post a Comment

Give me the commetns and solutions

Ledger Voucher creation Framework and x++ code to create ledger voucher

 Please click her for MS reference file Below is the out of the box example reference and code. SalesInvoiceJournalPostSubBill_Extension->...