I'm trying to use the Dynamics NAV web service on the Sales Invoice entity to create invoices in NAV that are generated from another system.
The problem I'm running into is when I try and create an invoice with a different invoice number to what is next on the number sequence, I get the following error:
The Sales Header already exists. Identification fields and values: Document Type='Invoice'
If I follow the steps on this blog post
I can create an invoice and then update the rest of the fields except for the invoice number.
Is there a way to use the web service to create an invoice with a custom invoice number?