How are the item cost calculated?

Hi all,

I just want to know how are the item’s cost calculated, it seems certain batch jobs are supposed to run every night to dynamically generate new item cost on daily basis, is this the standard practice for every AX 2012 implementation?

Thank you,


Hi Kwen,

The behavior for costing is depending on the costing model you are using. You can read the Cost management whitepaper to get an understanding. This document was written for AX2009, but is still applicable. A new moving average model was introduced in AX2012.

When you use a costing method which needs recalculation and closing, the recalculation can run every night, but can also be setup to run weekly, depending on your needs. The closing should run at least every period for your month end procedure. Depending on the number of transactions that needs to be closed, it can be setup to run weekly.

Hello Andre, thank you for the white papers, I read through the AX2009 paper and learned the models’ ideas.

But can you (or anyone that can help) provide some guide about how to pick up Standard MS methods when we want to generate the item’s cost?
Say, the inventory is re-calculated every night, then what is the desired method to pick up when I am asked to give the cost for a specific item?

-1- I found “InventTable.costPcsPrice()” is used a lot, but is it always good method to dig out the cost number?

public server display CostPrice costPcsPrice(
InventDimId _inventDimId = ‘’,
InventDim _inventDim = null,
InventTableModule _inventTableModuleInvent = null,
PriceDate _priceDate = systemDateGet(),
boolean _throwError = false)

The minute I see these “cacheKey” / “cacheValue” I am really not that certain.

-2- I noticed there is a field [SalesLine].[CostPrice], but it seems it’s written at certain time point, I checked cross-ref, there are so many of places! And it’s not the average cost.

-3- Anyway, I noticed the InventDimId is always checked when doing the average cost, can I get some help about why this is the case?

Thank you very much!


Hi Kwen,

You are now changing the topic to a technical/development question. Can you create a new question in the correct forum?

Sure, I will do that