最新消息:ww12345678 的部落格重装上线,希望大家继续支持。

Recalculate InventSum

网络文摘 William 383浏览 0评论
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 ******************************
发表我的评论
取消评论

表情

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址