Monday 24 December 2018

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

In this blog I will discuss how you we can post pending vendor invoice. For that I have created a job and using PurchFormLetter_Invoice class which will post the invoice.

Please see below screenshot and explanation of source code.

Explanation of source code:
  • Initialize of tables and class variables.
  • Get purchase order table.
  • Get vendInvoiceInfoTable table buffer by purchase order Id and pending vendor invoice number.
  • Update match status invoice.
  • Initialize PurchFormLetter_Invoice class.
  • Update purchase order parameter table.
  • Call PurchFormLetter_Invoice class update method.
    • Argument-1: Purchase order table buffer.
    • Argument-2: Pending vendor invoice number.
    • Argument-3: Posting date.
    • Argument-4: Purchase update type.
    • Argument-5: Account order status.
    • Argument-6: Proforma invoice is set to NO.
    • Argument-7: Print management option is set to NO.
That is all you need to do for posting pending vendor invoice through X++ code in Dynamics 365 Finance and Operations. For creating pending vendor invoice you can follow my previous blog Job to create pending vendor invoice through X++ code in D365FO.

No comments:

Post a Comment

How To: Customize BankPaymentAdviceVendV2 SSRS Report

In D365FO, there are two versions available for bank payment vendor invoices. However, in the latest version, Microsoft has made it mandator...