Posts

Showing posts with the label Sales Order Total

Get Sales Order Totals using X++

Image
We can make use of standard class SalesTotals to get the Totals subform related fields data through X++. SalesTotals returns a container with lot of fields in it, Some of them i have listed below. static void SalesOrderTotal(Args _args) {     SalesTotals     salesTotals;     SalesTable      salesTable;     container       displayFields;     str             totalTax,  amountInclTax, amountWithoutTaxTxt;     AmountMST       amountWithoutTax;          salesTable = salesTable::find('S000076');     salesTotals  =  SalesTotals::construct(salesTable, salesUpdate::All);     salesTotals.calc();     displayFields =  salesTotals.displayFieldsCurrency(salesTotals.currencyCode());     amountWithoutTaxTxt     = conpeek(displayFields, ...