January 4, 2016 Leave a comment
This blog refers to consuming or creating Pending vendor invoice record in dynamics ax 2012 R3 using out of box service “VendVendInvoiceService”. The focus of this blog is .net C# side. In this example I took the complex case of creating Vendor invoice that linked to multiple PURCHASE ORDERS in received status.
This ADDHeader method insert record in VendInvoiceInfoTable, for this example I just filled the required ones.
This ADDLine method insert a line in VendInvoiceInfoLine table. this is helper method will be called from main executing point.
This is the main executing method, In this method I did initialization of required objects, make find call of two purchase order records using Purchase order service (You could do this by any way, hard coded or service call or through .net proxies). Here I am also making the call of AddHeader method to create the header record
Further on the same method, call AddLine to create Line record, Also specify the QTY that how much I want to invoice from the receiving, I did the same for both the purchase orders.
After composing complete message, making Create call to service
Amir (Happy Daxing)