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

DB restore production DB to DEV environment in D365 FO using Bacpac file

  https://www.linkedin.com/pulse/restore-production-database-dev-environment-d365fo-using-abbas-tfwbe SQLPackage link : https://www.linkedin...