Corrupted data that may prevent you to post a purchase invoice

We have come across some scenarios where it was not possible to complete purchase invoicing, for example:

  • There is pending invoice in AX that is not visible in invoicepool. It can be seen only from purchase order side. It blocks many orders.
  • A Pending Invoice is not appearing in PL>common>Pending Supplier Invoices however when you go to the PO and look at the invoice tab, the Pending Invoice is still highlighted and when you select this you can see the detail of the pending invoice but we cannot do anything with it
  • When trying to post a purchase invoice you get an error message that says: Invoice %1 could not post because it contained matching errors which must be approved.
  • While selecting Pending vendor invoice gets an error as “One or more pending invoices cannot be displayed because they are in use” and the invoice is not displayed.

It may happen that if AOS gets stopped suddenly or the client loses connection with the AOS, some records stay in specific tables that causes these kind of situations. In other cases we or Partners could not find repro steps to get those scenarios.

I found a list of the SQL tables where the ‘pending’ record may exist. If the record is found in any of the following tables, the recommendation is to remove it when you have no users accessing AOS (and take normal precautions first of backing up the data). Also test the procedures in a test/development environment before applying it to a live enviroment. Then, check to see if you are able to properly invoice update the PO.


Of course, you can also delete these records going through Forms, these are the ones I used (ensure no users besides you are working in the application):
1. Firstly checking PurchParm tables when looking History forms (Account Payable/ Inquiries/ History/ Purchase orders), and delete those records where the status is “Waiting”.
2. The next step is to check VendInvoiceInfo tables where you found the wrong records, You can access those records in the list page: Accounts payable module > Places > Pending Purchase Order Invoices. Here you can delete it as well. Note: pending invoice of your case will be in this list page.


Hope it’s helpful

Kind regards

Marialecia Guada

Dynamics AX SCM Technical Lead