Question: I need to get Item purchasing price using x++ code.
Answer:
container result;
result = PriceDisc::findItemPriceAgreement(ModuleInventPurchSales::Purch, ItemId, InventDim, Unit, today(), Qty, VendAccountNum, CurrencyCode, "0");
purchPrice = conPeek(result, 0);
Note: The variables shown above to pass as parameters are self explanatory and should be replaced with your variables.
Answer:
container result;
result = PriceDisc::findItemPriceAgreement(ModuleInventPurchSales::Purch, ItemId, InventDim, Unit, today(), Qty, VendAccountNum, CurrencyCode, "0");
purchPrice = conPeek(result, 0);
Note: The variables shown above to pass as parameters are self explanatory and should be replaced with your variables.