Get SalesPrice for specific Item and Customer

I want to find the SalesPrice for item that is in the SalesPrice Agreements for the customer.

I am trying this way:

priceDisc = new PriceDisc(ModuleInventPurchSales::Sales,

inventJournalTrans.ItemId,

inventJournalTrans.inventDim(),

inventJournalTrans.UnitId(),

systemdateget(),

inventJournalTrans.Qty,

custTable.AccountNum);

if (priceDisc.findPrice(custTable.PriceGroup))

price = priceDisc.price();

else if (priceDisc.findItemPrice())

price = priceDisc.price();

And I think that its not finding any price and returning default price for the item.

If you don’t want findPrice() to find item price, set its second argument to false.

If it’s not finding any price, you probably don’t have any agreement for the parameters you’re using.