In this episode of What’s Cooking in Business Central, we discuss storing document attachments. We will look at how to keep these attachments outside the Business Central database. We will use external storage for this purpose. This feature helps move files out of the database and into external file accounts such as Blob Storage, File Share, or SharePoint.
Below is a simple explanation of how it works and how to set it up.
Why Use External Storage for Document Attachments?
Document attachments can take up a lot of space in the Business Central database. By storing them in external storage, files are kept outside the database while still being linked to records like sales orders.
Once files are offloaded, it becomes your responsibility to back them up and manage them properly. If a file is deleted from external storage, it will no longer be available in Business Central.
Step 1: Configure External File Accounts
To use external storage for document attachments, you first need an external file account. This can be:
- Blob Storage
- File Share
- SharePoint Storage
After the external file account is set up, go to Navigate and select File Scenarios, then choose Assign Scenarios.
You will see a new scenario called Document Attachments External Storage. Select this scenario and confirm that you want to use this feature. The system will warn you that this is used at your own risk, as file backups and maintenance are your responsibility.

Once confirmed, the scenario is assigned to the file account.
Step 2: Enable External Storage Setup
Next, you need to configure the module further.
Open Additional Scenario Setup. This can be accessed either from the file scenario assignment or from the fact box on the external file account.
When the external storage setup page opens, enable the feature.
After enabling it, you must set a root folder. You can choose a folder at the top level or select a folder inside the hierarchy.

Step 3: Set Upload and Delete Policies
There are several important options to configure:
Upload and Delete Options
- You can choose to delete files immediately after they are uploaded to external storage.
- If this option is enabled, the delay option becomes unavailable.

- If this option is turned off, you can enter a date formula.
- This controls how long files stay in the Business Central database before they are deleted.

Scheduled Upload
You should also enable Scheduled Upload.
This creates a job queue that automatically offloads document attachments from the database.

Delete External Files Option
There is also an option to delete external files when attachments are deleted in Business Central.
In some cases, you may want to remove the file from Business Central but keep it in external storage.
If you select this option, the file will stay in external storage even if it is deleted in Business Central.

Step 4: Using Document Attachments in Business Central
Once everything is set up, the feature is ready to use.
Go back to the Role Centre, open a Sales Order, and go to Document Attachments.

Select Upload File, then drag and drop your files.
The files will appear in the fact box and will be automatically offloaded to external storage. Depending on your setup, the files may:
- Be deleted from Business Central after a set time, or
- Be kept temporarily in the Business Central environment

Step 5: Confirm Files Are Offloaded
To confirm that files have been moved to external storage:
- Go to External File Accounts
- Open the file account where the scenario is assigned
- Select Additional Scenario Setup
- Choose Document Attachments

Here, you will see a list of uploaded document attachments. The field Uploaded to External will be set to True.
If a date formula is set (for example, delete after 7 days), the files will stay in Business Central only until that time expires.

Additional Features: Sync and Restore Files
This module also includes extra features:
- Storage Sync
This allows you to offload existing document attachments that are already stored in your database.

- Restore from External Storage
If all document attachments have been moved to external storage, you can bring them back.
Simply select From External Storage, and Business Central will download all document attachments back into the system

Final Thoughts
Storing document attachments outside the Business Central database helps manage storage better and keeps the system cleaner. However, once files are offloaded, it is important to manage backups and external storage carefully.
This feature gives you flexibility, automation, and control over how document attachments are stored and maintained in Business Central.

