You are receiving the below error message when attempting to publish an invoice.
Invalid Reference Id : Items element id not found
QuickBooks Online integrated companies.
This error is typically caused by a user selecting Categories rather than Product Codes when line items are added to an invoice.
To resolve this, please navigate to your company's Integrate page, and select the option highlighted in the image below before saving the changes. This should prevent the issue going forward.
To clear the error from your invoice(s), you will then need to do the following:
Unpublish the invoice.
Change the categories to Products/Services and then revert back to Categories.
Publish the invoice again.