Dispaly Method to Get Item OnHand QTY D365 X++

 [SysClientCacheDataMethodAttribute(true)]
    public display Qty salesQtyOnHand()
    {
         InventDim inventDim;
        InventDimParm inventDimParm;
        Itemid itemid;

        inventDim=  this.inventDim();
        InventOnhand inventOnHand;


        inventDimParm.initFromInventDim(inventDim);

        ////initialize the inventonhand with item,dimension and dim paramter
        inventOnHand = InventOnHand::newParameters(this.ItemId, inventDim, inventDimParm); 

        return inventOnhand.availPhysical();
}

Leave Comment

Your email address will not be published. Required fields are marked *