[AX 2012 FP] Division by Zero Error when Activate Item Price

  • Hi,

    My client is a manufacture company and use standard cost as their costing method. Periodically they update their item cost price. But the last time they try to update item cost price it raises an error Divison by zero. I post complete error log down here :

    Division by zero. - (S)\Classes\InventSplitTrans\updateSettlements - line 61
    (S)\Classes\InventSplitTrans\update - line 29
    (S)\Data Dictionary\Tables\InventTrans\Methods\updateSplit - line 15
    (S)\Classes\InventStdCostAdjust\adjustStdCostFinancial - line 45
    (S)\Classes\InventStdCostAdjust\updateStdCost - line 31
    (S)\Classes\InventStdCostAdjust\updateNow - line 6
    (S)\Data Dictionary\Tables\InventItemPriceSim\Methods\moveSimulatedToCurrent - line 75
    (S)\Classes\InventPriceActivationModule\activate - line 21
    (S)\Classes\InventItemPriceActivationJob\activateOneInventItemPriceSim - line 12
    (S)\Classes\InventItemPriceActivationJob\main - line 113
    (S)\Classes\xMenuFunction\runServer
    (C)\Classes\FormFunctionButtonControl\Clicked
    (C)\Forms\InventItemPrice\Designs\DesignList\InventPriceItemActivation\Methods\Clicked - line 5

    I’ve tried to do “compile forward” for each classes mentioned in that log but still doesn’t work.

    I have no idea how to fix this. Have anyone face the same problem and manage to fix this?


    Regards,

    Jefry

Hi,

In line 61 of the method updateSettlements() of the InventSplitTrans class, you can try to add a try/catch statement to deal division by zero but I think it’s a data problem, if the update of item cost price is done by batch, have a look at the file batched, there must be errors inside it.

Regards,

Thomas

Hi Thomas,

Thanks for your response and help. You’re right, it’s a data problem. I work with CW item and found that I have inventory unit quantity but missing CW unit quantity which in a normal occasion both quantity must be exists. Error is triggered when AX try to write PdsCWSettled into InventTrans.

Jefry

Solution:

Ctrl+D (AOT) screen whill appear

Select the Classes Node Right Click it and compile it

Once restart the AX Service

End

Shakoor

ERP Manager