Hi All,
File sharing is an integral part of Data sharing. You can import data from or export data to any external file through file variables.
The Business Central server (SaaS) can't access the user's local file system. To be able to work with files, you need to use streams.
Only the UploadIntoStream and DownloadFromStream functions are available for you to use as a developer in the SaaS version of Business Central.
UploadIntoStream
Syntax: [Ok :=] UPLOADINTOSTREAM(DialogTitle, FromFolder, FromFilter, FromFile, NVInStream)
Example:
DownloadFromStream
Syntax: [Ok := ] File.DownloadFromStream(InStream: InStream, DialogTitle: Text, ToFolder: Text, ToFilter: Text, var ToFile: Text)
Example:
Reach out to me if you have any questions or suggestions.
Check out other blogs, if you haven't already.
Can we save the file to some cloud space or shared drive via job queue.. i mean without any user intervention..
ReplyDeleteThank you for your question.
DeleteYou can have different cloud integration systems with BC SaaS, that is the beauty of it. BC also has the ability to Integrate Sharepoint and OneDrive, you can store your files there.
On the other hand, you can of course create a job queue which will use that service and export your files there.
What is shown here, is files that are stored at BC level, all it stores is a metadata, if say a PO is archived, you cannot retrieve that file.
Hope this helps.