I am trying to download a file located in the document attachment table. But so far I have only been able to retrieve the DocumentReferenceId but not the actual file. Is it possible?
hougaard Answered question June 18, 2025
Check this: https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/api-reference/v2.0/api/dynamics_attachment_get
hougaard Posted new comment June 18, 2025
You need to get the attachment ID first (from the attachment table/api, then you can use the above API to download an attachment.
For a little more context this is on the Items page, since I am not seeing Items on this page (https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/api-reference/v2.0/resources/dynamics_attachment) is it safe to say attachments for documents are handled differently?