Announcements
How to check for released products currently on-hand in D365FO using x++ code?
Please advice.
I am sharing this function. It gets two arguments which are as follows:
ItemId
InventDimId
It returns on hand inventory.
public InventQtyAvailPhysical onHandInventory(ItemId _itemId, InventDimId _inventDimId)
{
InventOnhand inventOnhand;
InventDim inventDim = inventDim::find(_inventDimId);
InventDimParm inventDimParm;
inventDimParm.initFromInventDim(inventDim);
inventOnhand = InventOnhand::newParameters(_itemId, inventDim, inventDimParm);
return inventOnhand.availPhysical();
}
André Arnaud de Cal... 291,359 Super User 2024 Season 2
Martin Dráb 230,370 Most Valuable Professional
nmaenpaa 101,156