Get Physical reserved of item in D365fo x++

 Get Physical reserved of item in D365fo x++

SQL:

public static Qty getPhysicalReserved(ItemId _itemId, InventDimId _inventDimId)
    {
        InventOnhand inventonhand ;
        InventDim inventdim;
        InventDimParm inventdimparm;
        Qty qty;

        inventdim.inventDimId = _inventDimId;
        inventdim.InventSiteId = InventDim::find(_inventDimId).InventSiteId;
        inventdim.inventlocationid = InventDim::find(_inventDimId).InventLocationId;
    
        inventdimparm.initFromInventDim(inventdim);

        inventonhand = InventOnhand::newParameters(_itemId, inventdim, inventdimparm);

        qty = inventonhand.reservPhysical();
        
        return qty;
    }

Comments

Popular posts from this blog

D365FO – AX – X++ –Refresh, Reread, Research, and ExecuteQuery

Create Inventory Journal through Code in D365FO X++

SalesLine Reservation in D365fo x++