InventSum is needed to recalculate sometimes.We should use InventSumRecalcItem class in Dynamics AX.
Sample Code :
// CODE BEGIN ****************************
InventSumRecalcItem InventSumRecalcItem;
;
InventSumRecalcItem = new InventSumRecalcItem("ITEM001", true, checkfix::fix);
InventSumRecalcItem.updatenow();
// CODE END ******************************
First parameter : ItemId
Second parameter : Show errors
Third parameter : Fix or only check
If you want to calculate for all items :
// CODE BEGIN ****************************
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();
}
// CODE END ******************************
10 comments:
Hi,
I have encountered inventsum issue, about item without QTY but have financial value. (use weight avg date) Do I have to use Recalculate InventSum for this particular item? What will be impact, if yes? Thank you for your advise?
AX Dummy
Hi Anil. Thanks. We had same problem in AX 2012 RTM, and this fixed the problem.
Hi Anil. I had same problem in AX 2012 RTM, and this fixed the problem. Thanks :-)
Hi Anil!
I was looking a solution for this problem in InventSum table. Your code worked and saved me!
Thank you so much!
Thanks a lot Anil for the fix! The InventSum table can easily get out of sync. In addition, it's weird how it updates itself. I don't understand how it fully works but am glad I found your awesome article.
Please can anybody explain.. why there will be difference between inventtrans and inventsum. This is a major issue in Axapta and how users will know the difference. Reports are completely wrong and system is incorrect.
Tesekurler Anil isme yaradi
Selamlar
Thanks my friend!!! you are amazing!!!
Thanks your support!
I’d have to check with you here. Which is not something I often do! I get pleasure from reading a publish that may make people think. Additionally, thanks for permitting me to remark! real money casino
Post a Comment