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.

As time goes by

I will to to post some of the things I find while browsing the net. Posts will probably concern my professional interest, e.g. software develepment methologies, quality assurance in its broadest sense, process optimization and software development within the Dynamics AX framework, but do not despair if the occational non-professional post emerges.