How to use info from CustTable.LineDisc ?

Hello I need to make a new field on some report, which field has to display an information about discount from CustTable I’ve tried to do something similar to funcionality on SalesTable form, where information from CustTable.lineDisc is copying to SalesTable, and then discount is counting on SalesLine I’ve tried to use a class PriceDisc, because this class is used by this funcionality on SalesTable. But it doesn’t work [:(] It returns me always a standard price, not after a discount So, does anyone of us know how to solve my problem ? Maybe someone has some final solution ? I think it should be a three lines in X++ I wrote an initialization of PriceDisc (it was a first line) a second line was priceDis.findPrice(ductTable.lineDisc) And the last was priceDisc.price() And as I wrote…it doesn’t work [:(]

Sorry, I didn’t have time to look at the PriceDisc class, but I have a couple of guesses that you might check out: First of all, why don’t you use the debugger to see the place where the price is evaluated. What my guess is - the initialization has to include a line where you parm the table you will be using as the main table in the class. Maybe in the case statement of initialization (to support many tables) your table is not present.