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

物料库存现有量 X++扩展Dynamics 365用于财务和运营 / On hand Inventory for Item X++ extensions Dynamics 365 for finance and operations

网络文摘 alirazazaidi 28浏览 0评论
Today is very small tip. Today is Eid day, Very warm wishes for Eid holidays.
Here is code snippet for  on hand inventory method. I wrote with extension.
For for extension. create a new class and add attribute on Extension fo Class.
[ExtensionOf(tableStr(PurchLine))]
public static class  PurchLine_Extension
{
    [SysClientCacheDataMethodAttribute(true)]  //This attribute will cache your display method.
    public static display Real  MYOnHand( PurchLine _this)
    {
        InventOnHand inventOnhand;
        InventDim       InventDim;
        InventDimParm inventDimParm;
        inventDimParm.initFromInventDim(_this.inventDim());
        inventOnHand = InventOnhand::newParameters(_this.Itemid,_this.InventDim(),inventDimParm);
        return inventOnHand.availPhysical();
    }
}
发表我的评论
取消评论

表情

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

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