Table of Contents

File Storage

File Storage in 3PL Dynamics can be implemented in multiple ways. The default implementation is Azure Blob Storage. Alternative implementations include Azure File Share, SharePoint, or an on-premises SMB share.

There are three configuration pages for file storage, which can be found through TellMe by searching for “File Storage”.

1. File Storage – Services

The configuration of a file storage implementation is stored in a File Storage Service. A File Storage Service defines how to access a specific storage type (e.g., Azure Blob Storage, SMB). Each storage service has several configuration parameters that vary per storage type. File Storage Services are shared between companies in Business Central, meaning a single service can be used by multiple companies. The parameters per storage type are listed below.

A File Storage Service has a Usage, which can be either Production or Sandbox. Production services are intended to contain live data. A production service can have overrides—these specify that for a specific non-production environment, a different storage service (a sandbox service) should be used instead. Overrides are mandatory for the default storage service of a company. In other cases, if no override is configured, the production service is also used in non-production environments. Configuring overrides is therefore strongly recommended.


Azure Blob Storage (3PL Client)

This is the default implementation of Azure Blob Storage. To use this type, first set up an Azure Storage Account in the corresponding setup page. In the File Storage Service, specify this account and the container name. The container can be existing or new; 3PL Dynamics will create it automatically if it does not exist. Supports metadata (as blob tags) from version 27.0 and higher.


SharePoint

This type allows access to organization site files hosted in SharePoint. An Entra app registration with SharePoint V1 API and MS Graph sharepoint permissions are required. These permissions should be Sites.Selected. With Sites.Selected the rights should be setup within Sharepoint. See this Microsoft learn page about it: https://learn.microsoft.com/en-us/graph/permissions-selected-overview?tabs=http#how-selected-scopes-work-with-sharepoint-and-onedrive-permissions

The app registration should have a certificate for authentication. This certificate should be encrypted with pkcs12. The app registration can be set up in Microsoft Entra Applications (outgoing connections). This Entra application can then be used in Http(s) Endpoints (outgoing connections), where the URI should look like:

<organization_name>.sharepoint.com/sites/<site_name>

The scope should be:

https://<organization_name>.sharepoint.com/.default

This endpoint can then be selected in the File Storage Service setup for SharePoint. The base path in the File Storage Service must be filled with a directory path preceded by the site information. This should be the same site as in the URI.

/sites/<site_name>/<folder_name>

Available from version 26.0 and newer.


OnPrem Agent Local Storage

This type allows access to an SMB share or local files through an OnPrem Agent (print service). Specify which OnPrem Agent to use. You can also specify a Base Path that serves as the container for all files in 3PL Dynamics. Files outside this path are never accessed or stored. The base path itself is not recorded in record links. Any configuration (e.g., transport location on a DI Message Type) should use a relative path. The base path is optional but highly recommended. Note: This type is not suitable for use as default file storage in cloud environments, as latency is typically higher than with Azure-based options.


OnPrem Agent SFTP

This type allows access to an SFTP share through an OnPrem Agent (print service). Specify which OnPrem Agent to use and provide credentials for the SFTP share. This storage type is commonly used by the File Transfer functionality or in DI Message configurations to transfer files between an SFTP share and the default 3PL Dynamics file storage. Not recommended as default storage for cloud environments due to higher latency. Note: FTPS is a different protocol and is not supported. This type replaces the obsolete Azure Function SFTP type. The SFTP server must allow connections from the OnPrem Agent server's IP address.


Azure File Share

This type allows access to an Azure File Share through a configured Azure Storage Account (similar to Azure Blob Storage using the newer clients). It is typically used for purposes similar to SFTP—exposing or retrieving files from a shared folder.


Azure Function SFTP (obsolete)

Warning

This storage type is obsolete and is no longer available from version 29. Use OnPrem Agent SFTP instead.

This type accessed SFTP shares through an Azure Function. Existing File Storage Services of this type should be migrated to OnPrem Agent SFTP.

Migrating to OnPrem Agent SFTP

  1. Set up an OnPrem Agent at the customer site (see OnPrem Agent setup), if one is not already present.
  2. Create a File Storage Service of type OnPrem Agent SFTP with the same SFTP host, credentials and path, and select the OnPrem Agent.
  3. Check IP whitelisting on the SFTP server (see below).
  4. Replace the obsolete service wherever it is used (Record Link Setup, DI Message Types, File Transfer configuration) and test a file transfer.

IP whitelisting

With Azure Function SFTP, connections to the SFTP server came from Azure IP addresses. With OnPrem Agent SFTP, connections come from the server on which the OnPrem Agent runs, at the customer site. Many SFTP servers only accept connections from whitelisted IP addresses, so the public (outgoing) IP address of the OnPrem Agent server must be added to the SFTP server's whitelist. Because this server is under the customer's own control and usually has a fixed outgoing IP address, this is simpler than whitelisting Azure ranges, but it must not be forgotten: otherwise file transfers will fail after migration. The old Azure IP addresses can be removed from the whitelist once the migration is complete.

2. File Copy Jobs

A File Copy Job defines a copy task between storage services or within a single service. It is primarily intended for copying files between production and test environments, which usually use different storage services. This is useful when reproducing a scenario in a test environment that requires files available only in production.

You can create a copy job from the File Copy Job List, accessible from the File Storage Service List. Configuration is straightforward: specify a source and target storage service, and define the source and target paths. You can choose whether to overwrite existing files on the target or keep the originals.

Be careful not to copy files from a test environment to production. Running such a job from a non-production environment will trigger a warning, but it is still advisable to verify the configuration before executing it.

3. File Storage – Company Setup

Each company using 3PL Dynamics file storage must be configured with a default File Storage Service. This page allows you to define that default service. It will be used whenever no specific file storage configuration applies. You can initialize a new service with overrides using the Initialize Company action.

You may want to store files for specific orders or document types on a different storage service. Record Link Setup allows you to create exceptions to the company’s default configuration—for example, storing TMS Document files on a different SharePoint site than WMS Document files.

Record Link Setup also enables creating carbon copies of files on another storage service, such as an SFTP share accessible to a customer.