InventSum
is needed to recalculate sometimes. We should use InventSumRecalcItem
class in Dynamics AX.
1
2
3
4
| InventSumRecalcItem InventSumRecalcItem;
;
InventSumRecalcItem = new InventSumRecalcItem("ITEM001", true, checkfix::fix);
InventSumRecalcItem.updatenow();
|
First parameter : ItemId
Second parameter : Show errors
Third parameter : Fix or only check
What if you want to calculate for all items:
1
2
3
4
5
6
7
8
9
| InventTable InventTable;
InventSumRecalcItem InventSumRecalcItem;
WHILE SELECT InventTable
WHERE (InventTable.ItemType == ItemType::Item) || (InventTable.ItemType == ItemType::BOM)
{
InventSumRecalcItem = new InventSumRecalcItem(InventTable.ItemId, true, checkfix::fix);
InventSumRecalcItem.updatenow();
}
|
This is outdate, please refer this post.
Thank you for reading!