Trying to delete a pending invoice in Invoice History and Matching Details screen. Invoice is showing up in "Waiting" Job Status and when I try to delete it I get following error:
About to update a record in table 'PurchLine' which was not selected for update (RecId is 5637156845). [W-0108]
(S)\Classes\xRecord\doUpdate
(S)\Classes\PurchLineType\setPurchStatus - line 113
(S)\Classes\PurchLineType_Project\setPurchStatus - line 5
(S)\Data Dictionary\Tables\PurchLine\Methods\setPurchStatus - line 6
(S)\Data Dictionary\Tables\VendInvoiceInfoTable\Methods\Delete - line 70
(S)\Classes\xRecord\dbOpInTransaction
(C)\Classes\FormDataSource\delete
(C)\Forms\VendInvoicePostingHistory\Data Sources\VendInvoiceInfoTable\Methods\delete - line 3
(C)\Classes\FormRun\task
(C)\Classes\SysSetupFormRun\task - line 20
Cannot edit a record in Purchase order lines (PurchLine).
The operation cannot be completed, since the record was not selected for update. Remember TTSBEGIN/TTSCOMMIT as well as the FORUPDATE clause.
Please help
*This post is locked for comments
Thank you ToddB. I opened a ticket with Microsoft and they had me download the hotfix mentioned in KB 3002889. That worked. I am able to delete pending invoices now.
Hi CJ,
In addition, KB 3002889 is available for both AX 2012 R2 and R3; and depending on your version you would want to search for the correct install via Issue search in LCS (https://lcs.dynamics.com):
"Cannot edit a record in Purchase order Lines (PurchLine). The operation cannot be completed since the record was not selected for update" error when trying to delete a second pending invoice.
Thanks, Todd
Hi CJ,
Are you using AX 2012 R2?
If so, have you taken a look at KB 2893998: Pending invoices are not saved correctly, vendor invoices duplicating, unable to post, and inquiries appearing incorrectly.
https://lcs.dynamics.com/?si=6&fw=/kb/2893998
Thanks, Todd
Mohamed Amine Mahmoudi
100
Super User 2025 Season 1
Community Member
48
Zain Mehmood
6
Moderator