Forum Discussion

hraftery's avatar
hraftery
Contributing User
8 days ago

How to duplicate (verb) an invoice

While I found many references for duplicate (adjective) invoices, I couldn't find any guidance on duplicating an invoice. In other words, performing via the API the same function achieved by clicking the "Save and duplicate" button when viewing an invoice in the app.

 

I gather you can essentially POST an invoice you GET from Sale/Invoice/Item back to the same endpoint. But you need to strip at least some of the old fields out first so MYOB can create new records.

 

So I've tried removing the following:

 

  • UID

  • RowVersion

  • LastModified

  • URI

  • Number

And setting a new Date. But then it borks on "RowID not valid" for the Lines items.

 

Any ideas?

No RepliesBe the first to reply