web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :

Job to create pending vendor invoice through X++ code in D365FO

dasdasd Profile Picture dasdasd 841
A vendor invoice from a purchase order is an invoice that is produced when products or services are received according to a purchase order that was placed with a vendor. The vendor invoice contains a header, and one or more lines for items or services. A vendor invoice completes the cycle from purchase order to product receipt to vendor invoice. In this blog I will discuss how we can create pending vendor invoice through X++ code in Dynamic 365 finance and operations. So lets begin.

Please follow series of screenshots of source code with explanation:

Source code explanation: (1.1)
  • Initialization of table buffers.
  • Get purchase order table. 
  • Get purchase order lines.
  • Get vendor table.























Source code explanation: (1.2)

  • Insert data in VendInvoiceInfoTable table.
  • This table contains the vendor invoices for one or more purchase orders.
  • Assignment of values.

















Source code explanation: (1.3)
  • Insert data in VendInvoiceInfoSubTable table.
  • This table contains the associations between the vendor invoices and the purchase orders.
  • Assignment of values.










Source code explanation: (1.4)
  • Insert data in VendInvoiceInfoLine table.
  • This table contains vendor invoice lines for a specific purchase order.
  • Assignment of values.














Source code explanation: (1.5)
  • Insert data in VendInvoiceInfoSubLine table.
  • This table contains associations between the vendor invoice lines and the posted vendor packing slips.
  • Assignment of values.













That is all you need to do for creating pending vendor invoice through X++ code.

This was originally posted here.

Comments

*This post is locked for comments