I am using ax 2012.
I am trying to delete the pending invoice in purchase order module and getting the following error.
The pending invoices are not visible in the AP>Enquires>History>Invoice history and Matching tables. But it is present in the VendInvoiceInfoTable.
I tried deleting it from the table I still get the same error. I can able to delete it by writing a job using dodelete(), but i want a permanent solution for this.
When I get the sourceDocumentHeader from the vendInvoiceInfo table and when I check in Accounting Distribution I can find 2 records related to it. If i delete those records I can able to delete the invoice from the front end.
Bu its not best practice to delete records from accounting distribution .
Someone can help me with any alternatives?
Wekey said:On checking in sourceDocumentLine table find method returns a null value . But the passed recId value is present in the table
This is something, that i don't understand.
Try creating a similar PO, follow similar steps and see what happens? Also compare records in sourceDocument tables.