top of page
Search

Download a file using Business Central from Azure Blob Storage with AL Code

  • Josh
  • Jan 13
  • 1 min read

In this example, we will download a csv file and import into Business Central.

Please note this is simply for demo purposes, if you are using this within your real environments, you should use a table to store the variables so that they are not hardcoded.


We need to create a function to import customers from an InStream.


This is a simple example, you may want to include adding code to import a customer using a template etc.



Next we need to create the function to download the file into an InStream. Remember a setup table is required to store the values (Account Name, Container Name, Key Storage Id) but so you can visually see how it works these are just variables.



This is great but when the process will run again, the file will still be there unless a policy is in place to delete them, however, using BC code we could move them to an archive folder so that they are not imported again.

To achieve this, create another function to read the original container and move them to an archive container:



Add this function at the end of the ReadFileFromAzureBlobStorage



I hope this helps you download files from Business Central to Azure Blob Storage. Please reach out if you have any questions.

 
 
 

Comments


© 2026 by The BC Developer. All rights reserved.

bottom of page