PO Total Amount in Workflow

How to get the PurchaseOrder total amount in Workflow D365 . I see there is Purchase Orders.InvoiceAmount . But that the Invoiceamount , but the PO will not be invoiced until its approved . So how do i get the PO totalamount when its just got created

I think it’s the right field. It seems to me that the implementation (PurchTableDocument.parmCalcInvoiceAmount()) uses the total amount of the order (“what will be invoiced”), not the already invoiced amount.

Please try it.

Thanks Martin will try and will let know . BTW where is that field . Is that a display method . If its is display method i dont see the name as well . There is one display method for InvoiceAmount. but thats getting from vendinvoicejour. And I dont see method parmCalcInvoiceAmount in Purchtabledocument

Look again. This documentation page proves that PurchTableDocument.parmCalcInvoiceAmount() exists already in AX 2012 (and I did look into D365FO when I was composing my previous reply).

cool thanks martin . got it . One last question . how does this class method (PurchTableDocument.parmCalcInvoiceAmount() ) is shown in Workflow fields , I think it will get fields from Query object right i.e PurchTableDocument

The framework looks at the document class and takes fields from the query it uses plus methods like parmCalcInvoiceAmount().