RE: Odata for attaching documents/links to the vendor invoices
Hi Gunjan, thank you for your reply!
1. I wasn't able to find entity LedgerJournalAttachmentsEntity", but I have tried to use "VendorDocumentAttachments".
ODATA:
TEST.axcloud.dynamics.com/.../VendorDocumentAttachments eq 'ussi' and VendorAccountNumber eq 'US_SI_000128'
Response:
{
"@odata.context": "TEST.axcloud.dynamics.com/.../$metadata
"value": []
}
As you can see it is empty, but I have attachments for this vendor. Or I am making mistake with query or this end-point is not designed to provide such information.
2. DocuRefEntity. You are right with that option I need to get somewhere the RecId value.
End-point:
TEST.axcloud.dynamics.com/.../BusinessDocumentDocuRefs
Response:
{
"@odata.etag": "W/\"TEST2ODcxOTUwMic=\"",
"DocuRefRecId": 68719477502,
"URI": "https://test.co",
"ContentBase64": "",
"RestrictionStr": "Internal",
"FileType": "",
"DocumentType": "test",
"TypeId": "URL",
"Restriction": "Internal",
"RefTableId": 9615,
"Content": null,
"Notes": "https://test.co",
"RefRecId": 68719516771,
"FileName": ""
},
So I need somehow to get DocuRefRecId or RefRecId for the Invoice header and then I can use this API to get the attachment OR to POST attachment.
Do you know where I can get DocuRefRecId or RefRecId for invoice?