Monthly Archives: March 2016

AX 2012: DIXF Error while importing product entity from staging to target

Data Migration Framework hit error while importing product entity from staging to target.

Error Details:

dmf error

Stack trace

(C)\Classes\DMFEntityWriter\write – line 244
(S)\Classes\DMFEntityWriter\runOnServerWriter – line 14
(C)\Classes\DMFEntityWriter\run – line 98
(C)\Classes\DMFEntityWriter\main – line 24
(C)\Classes\xMenuFunction\run
(C)\Classes\MenuFunction\run – line 85
(C)\Forms\DMFWriteData\Designs\DesignList\DMFEntityWriterBatch\Methods\Clicked – line 23

 

Resolutions:

Open Microsoft Dynamics Ax development workspace and navigate to the following:

AOT > Queries > DMFProductTargeEntity > DataSources > InventTable > DataSources

in InventTable > DataSources, delete RetailInventTable then save and compile DMFProductTargetEntity and go back to Target Entities Form.

Look for “Product” entity then click Modify target mapping and switch to Mapping details then click Generate mapping, click Yes to generate mappings from defaults.

Try again to import the files.

 

 

 

Advertisements

AX 2012: Update Default Site

InventTable inventTable;
InventItemInventSetup inventItemInventSetup;
InventItemPurchSetup inventItemPurchSetup;
InventItemSalesSetup inventItemSalesSetup;
InventDim inventDim;

ttsBegin;
while select forUpdate inventTable
{
inventDim.initValue();
inventDim.InventSiteId = ‘T1’;
inventDim.inventLocationId = inventTable.inventLocationId();
inventDim = InventDim::findOrCreate(inventDim);

//Default order settings
inventItemInventSetup= inventItemInventSetup::findDefault(inventTable.ItemId, true);
inventItemInventSetup.InventDimIdDefault = inventDim.inventDimId;
inventItemInventSetup.update();
inventItemPurchSetup= inventItemPurchSetup::findDefault(inventTable.ItemId, true);
inventItemPurchSetup.InventDimIdDefault = inventDim.inventDimId;
inventItemPurchSetup.update();

inventItemSalesSetup= inventItemSalesSetup::findDefault(inventTable.ItemId, true);
inventItemSalesSetup.InventDimIdDefault = inventDim.inventDimId;
inventItemSalesSetup.update();

}
ttsCommit;