Hi,
I have start implementing business central API, I have successfully implemented '/salesInvoices' and '/salesInvoiceLines' data upload.
However, I have faced issue with attaching document to SalesInvoice in the endpoint '/attachments'.
Whatever document I upload, I am getting the error "The record in table Unlinked Attachment already exists.
I used following request
Body:
{ “parentId”: “5a086bc7-195f-eb11-89f9-0022481ab2d5”, “fileName”: “Example.pdf”}
It was advised to retrieve the parent Id from the first successful attachment creation and use that parent Id in the PATCH request instead of creating a new one.
How to do that ? Which request I can use to retrieve the parent Id from the first successful attachment creation ?
Thanks in advance