Tuesday, July 23, 2019

How to get cost price of an Item based on Warehouse X++

public  real  GetCostPrice(ItemId _itemId, InventLocationId _inventLocationId)
    {
        InventDimParm inventDimParm;
        InventOnHand inventOnHand;
        InventSum inventSum;
        InventDim inventDim;
        ;

        select firstOnly1 inventSum where inventSum.ItemId == _itemId;
       
        //inventDim.InventSiteId = "SiteId";
        inventDim.InventLocationId = _inventLocationId;
        inventDimParm.initFromInventDim(inventDim);
        inventOnHand = InventOnHand::newItemDim(inventSum.ItemId, inventDim, inventDimParm);
        return inventOnHand.costPricePcs();
       // info(strfmt("%1", inventOnHand.costPricePcs()));
    }

Thanks
Uma

1 comment:

  1. Shrevya Technologies, your reliable authorized reseller providing adaptable cloud solution options for companies of all sizes, can help you get the best Microsoft 365 price in India. Discover clear and reasonable price options, including Business Basic (₹111/user/month), Business Standard, Premium, and Apps for Business, all supported by professional deployment, migration, and round-the-clock assistance.

    ReplyDelete

Get Enum Id and Enum Value in D365FO using SQL and X++

 Below is the sql get enum id and enum value of a enum in D365 F&O using sql. SELECT   enumidtable . NAME           'Enum Name' ...