0

Is your feature request related to a problem? Please describe.

Yes. When using the External Storage - Document Attachments app, the file path structure in external storage is fixed (RootFolder/EnvironmentHash/TableName/FileName-GUID.Extension). Partners and customers cannot customize how files are organized in external storage.


Multiple customers have requested the ability to:

  • Group attachments by Vendor No. or Customer No. in subfolders
  • Organize files by Posting Date (e.g. 2026-06-invoice.pdf)
  • Apply custom naming conventions based on document metadata


Currently, the procedure GetFilePathWithRootFolder in codeunit 8751 DA External Storage Impl. is local with no integration event, making it impossible for partners to extend or override the file path logic.


Describe the solution you'd like

Add an integration event OnBeforeGetFilePathWithRootFolder in codeunit 8751 DA External Storage Impl. that allows subscribers to provide a custom file path before the default logic executes.

Proposed event signature:


If IsHandled is set to true by a subscriber, the procedure should return the FileName provided by the subscriber instead of computing the default path.


Describe alternatives you've considered

  • Modifying the Root Folder setup field, but this only changes the prefix, not the internal folder structure or naming convention.
  • Creating a completely custom upload flow bypassing the standard app, but this defeats the purpose of using the standard External Storage framework and leads to duplicated logic.


Additional context

This request follows the standard IsHandled pattern already used extensively in Business Central for extensibility. The change is minimal and has no impact on existing behavior when no subscriber is registered.

Category: Development
STATUS DETAILS
New