Codeunit 8751 "DA External Storage Impl."
External Storage - Document Attachments · Microsoft.ExternalStorage.DocumentAttachments
Across versions
- BC23-28not present
- BC29-30present
Neighbourhood 8 connected objects and pages
External Storage - Document Attachments · Microsoft.ExternalStorage.DocumentAttachments · BC29-30 · source at ea08af5e · facts from BC29
Properties
| Property | Value |
|---|---|
| Access | Internal |
| Permissions | tabledata “Tenant Media” = rimd, tabledata “Document Attachment” = rimd, tabledata “File Account” = r, tabledata “DA External Storage Setup” = r |
Event subscriptions
- OnAfterInsertDocumentAttachment subscribes to Table “Document Attachment” OnAfterInsertEvent
- OnAfterDeleteDocumentAttachment subscribes to Table “Document Attachment” OnAfterDeleteEvent
- DocumentAttachment_OnBeforeExportToStream subscribes to Table “Document Attachment” OnBeforeExportToStream
- DocumentAttachment_OnBeforeGetAsTempBlob subscribes to Table “Document Attachment” OnBeforeGetAsTempBlob
- DocumentAttachment_OnBeforeGetContentType subscribes to Table “Document Attachment” OnBeforeGetContentType
- DocumentAttachment_OnBeforeHasContent subscribes to Table “Document Attachment” OnBeforeHasContent
- Document Attachment_OnInsertOnBeforeCheckDocRefID subscribes to Table “Document Attachment” OnInsertOnBeforeCheckDocRefID
- Document Attachment Mgmt_OnCopyAttachmentsOnAfterSetToDocumentFilters subscribes to Codeunit “Document Attachment Mgmt” OnCopyAttachmentsOnAfterSetToDocumentFilters
- Document Attachment_OnBeforeOpenInOneDrive subscribes to Table “Document Attachment” OnBeforeOpenInOneDrive
Procedures
BeforeAddOrModifyFileScenarioCheck(Scenario: Enum "File Scenario"; Connector: Enum "Ext. File Storage Connector"): Boolean: Called before adding or modifying a file scenario.GetAdditionalScenarioSetup(Scenario: Enum "File Scenario"; Connector: Enum "Ext. File Storage Connector"): Boolean: Called to get additional setup for a file scenario.BeforeDeleteFileScenarioCheck(Scenario: Enum "File Scenario"; Connector: Enum "Ext. File Storage Connector"): Boolean: Called before deleting a file scenario.BeforeReassignFileScenarioCheck(Scenario: Enum "File Scenario"): BooleanUploadToExternalStorage(var DocumentAttachment: Record "Document Attachment"): Boolean: Provides functionality to manage document attachments in external storage systems. Handles upload, download, and deletion operations for Business Central attachments.DownloadFromExternalStorage(var DocumentAttachment: Record "Document Attachment"): Boolean: Downloads a document attachment from external storage and prompts user to save it locally.DownloadFromExternalStorageToInternal(var DocumentAttachment: Record "Document Attachment"): Boolean: Downloads a document attachment from external storage and saves it to internal storage.DownloadFromExternalStorageToStream(ExternalFilePath: Text; var AttachmentOutStream: OutStream): Boolean: Downloads a document attachment from external storage to a stream.DownloadFromExternalStorageToTempBlob(ExternalFilePath: Text; var TempBlob: Codeunit "Temp Blob"): Boolean: Downloads a document attachment from external storage to a Temp Blob.DeleteFromExternalStorage(var DocumentAttachment: Record "Document Attachment"): Boolean: Deletes a document attachment from external storage.DeleteFromInternalStorage(var DocumentAttachment: Record "Document Attachment"): Boolean: Deletes a document attachment from internal storage.FileExtensionToContentMimeType(var Rec: Record "Document Attachment"; var ContentType: Text[100]): Maps file extensions to their corresponding MIME types.IsFileUploadedToExternalStorageAndDeletedInternally(var DocumentAttachment: Record "Document Attachment"): Boolean: Checks if a Document Attachment file is uploaded to external storage and not stored internally.SelectRootFolder(): Text: Opens a folder selection dialog for choosing the root folder.GetCurrentEnvironmentHash(): Text[32]: Gets the current environment hash for use in folder structure.IsFileFromAnotherEnvironmentOrCompany(DocumentAttachment: Record "Document Attachment"): Boolean: Checks if a file belongs to another environment or company.MigrateFileToCurrentEnvironment(var DocumentAttachment: Record "Document Attachment"): Boolean: Migrates a file from a previous environment or company folder to the current one.RunCompanyMigration(): Integer: Runs migration for all document attachments from a previous company.
Plus 8 local procedures.
Calls
From the extracted call graph of BC29 (graphify-al on the snapshot checkout): calls whose target is known from a declared type or an Object::"Name" argument. Interface dispatch and calls through events are not counted, so the list is not complete.
- Codeunit 9454 “External File Storage” (20 calls:
DeleteExternalFile → DeleteFile,DeleteExternalFile → Initialize,DownloadFromExternalStorage → GetFile, …) - Codeunit 9452 “File Scenario” (10 calls:
BeforeAddOrModifyFileScenarioCheck → GetSpecificFileAccount,DeleteExternalFile → GetSpecificFileAccount,DownloadFromExternalStorage → GetSpecificFileAccount, …) - Codeunit 8754 “DA Feature Telemetry” (7 calls:
DeleteExternalFile → LogFileDeleted,DocumentAttachment_OnBeforeExportToStream → LogFileDownloadFailed,DocumentAttachment_OnBeforeGetAsTempBlob → LogFileDownloadFailed, …) - Codeunit 4100 “Temp Blob” (5 calls:
DownloadFromExternalStorageToTempBlob → CreateOutStream,MigrateFileToCurrentEnvironment → CreateInStream,MigrateFileToCurrentEnvironment → CreateOutStream, …) - Codeunit 1266 “Cryptography Management” (1 call:
GetCurrentEnvironmentHash → GenerateHash) - Codeunit 27 “Confirm Management” (1 call:
BeforeAddOrModifyFileScenarioCheck → GetResponseOrDefault) - Codeunit 457 “Environment Information” (1 call:
GetCurrentEnvironmentHash → GetEnvironmentName)
Called by
- Page 8750 “DA External Storage Setup” (2 calls:
OnOpenPage → GetCurrentEnvironmentHash,SelectRootFolder → SelectRootFolder)
Implements
Recent changes
- 2026-09-15 #10828 Avoid remote attachment checks during FactBox refresh (main, BC30, performance)
- 2026-08-17 #10055 Fix: migrating a document attachment deletes shared Tenant Media (main, BC30, fix)
Ask your agent
Procedure bodies are not stored here (D10). The call sections above are our own, per object, from the BC29 call graph. For a procedure body or the calls of one procedure, ask bc-code-atlas (external, by Stefan Maron, MIT; default corpus w1-28), which the bc-observatory plugin connects: bcatlas_resolve_node(object_type: "codeunit", object_name: "DA External Storage Impl."), then bcatlas_get_procedure_body or bcatlas_get_neighbors on the returned id.