December 2019
Beginner to intermediate
770 pages
16h 14m
English
Attachments are files that you can link to entities or documents in Dynamics 365 Business Central. Two main tables are used to store attachments:
To store an attachment in these tables and then download an attachment from these tables, you need to use the previously mentioned UploadIntoStream and DownloadFromStream methods and load the BLOB field by using Streams.
An example of a function that uploads a file to the Attachment table is as follows:
procedure UploadAttachment() var Attachment: Record Attachment; outStr: OutStream; inStr: InStream; tempfilename: text; FileMgt: Codeunit "File Management"; DialogTitle: Label 'Please select a File...'; begin if UploadIntoStream(DialogTitle, ...
Read now
Unlock full access