Tuesday 16 October 2007

Faster data import in Dynamics AX

So here it comes - my first real post. I've been having some difficulties when importing data into an exsisting application. It takes forever, especially with tables CustTrans and LedgerTrans, so I browsed the net and found this tip.

Notice that you will lose audittrail of the transactions.

The tip is as follows :
Go into Class SysDataImport, and into the method : updateTransactionId()

Make it return early as possible from this method, and everything goes quick.
Just create it like this :

private void updateTransactionId(TableId _tableId, CreatedTransactionId _oldCreatedTransId, ModifiedTransactionId _oldModifiedTransId)
{
CreatedTransactionId newTransId = 0;
;
// Return as early as possible to increase import speed
return;
if (!hasTransIdSupport)
{
return;
}

if (hasCreatedTransId[tableIds[_tableId]])
{
.
.
.
}


Do likewise with method updateTransactionIdReference().



This posting is provided "AS IS" with no warranties, and confers no rights.

No comments: