Recalculate InventSum in Dynamics AX

InventSum is needed to recalculate sometimes. We should use InventSumRecalcItem class in Dynamics AX.

InventSumRecalcItem InventSumRecalcItem;
InventSumRecalcItem = new InventSumRecalcItem("ITEM001", true, checkfix::fix);

First parameter : ItemId

Second parameter : Show errors

Third parameter : Fix or only check

What if you want to calculate for all items:

InventTable InventTable;
InventSumRecalcItem InventSumRecalcItem;

	WHERE (InventTable.ItemType == ItemType::Item) || (InventTable.ItemType == ItemType::BOM)
		InventSumRecalcItem = new InventSumRecalcItem(InventTable.ItemId, true, checkfix::fix);

Thank you for reading!

Max Nguyen

Max Nguyen
MCP - Microsoft Dynamics AX Technical Consultant, currently living and working in Seoul, S.Korea :)

Number sequence farmework overview in Dynamics AX 2012

How to create number sequence in Dynamics AX 2012 with difference scenarios Continue reading

Overview delete action in Dyanmics AX 2012

Published on January 19, 2017

Response in AIF custom service class

Published on January 12, 2017