Hii,
I have following display method on SalesQuotationTable and it is returning total Cost Price of the Sales Quotation.
It has one big problem, when the SalesQuotation status is confirmed and it has Sales Order, this display method is returning zero Cost Price of the Sales Qutation. Any idea whats wrong or better approach.
display AmountCur costPrice()
{
SalesQuotationTable salesQuotationTable;
SalesQuotationTotals salesQuotationTotals;
container cont;
str cost;
real costValue;
salesQuotationTotals = SalesQuotationTotals::construct(this);
//or try salesQuotationTotals = SalesQuotationTotals::construct(this.QuotationId);
salesQuotationTotals.calc();
cont = salesQuotationTotals.displayFieldsCurrency(salesQuotationTotals.currencyCode());
costValue = conpeek(cont, TradeTotals::posCostValue());
return costValue; }

Please see the original post. https://community.dynamics.com/ax/f/33/t/275265
Thanks,
*This post is locked for comments
I have the same question (0)