I want to upload files as attachment to a document in Exact Online.
The following SQL has been used to create the document:
insert into exactonlinerest..documents
( salesinvoicenumber
, type
, subject
, account
)
select 16700001
, 10
, 'subject 3'
, id
from Accounts
where code like '%24274514'
This create a document related to Exact's sales invoice 16700001 and associates it with the account (customer) 24274514.
When I execute the following insert statement through the REST APIs of Exact Online:
insert into exactonlinerest..DocumentAttachments
( attachment
, document
, filename
)
select attachment
, 'ea2d9221-31b0-4217-a82f-f29c5d517b41'
, filename
from exactonlinerest..documentattachments
where filename like 'Loonstrook%'
I get an error:
itgenoda001: Verplicht: Bijlage (https://start.exactonline.nl/api/v1/102673/documents/DocumentAttachments)
How do I upload these existing pay slips contained in Exact Online as attachments to a new document?
PS. the GUID ea2d9221...
was found by querying the documents after inserting one.