SharePoint Connector Documentation
Index

Transfer Attachments to SharePoint

The SharePoint Connector includes functionality to transfer existing Business Central attachments to SharePoint. This page explains how to migrate your document attachments.

Transfer Overview

What is Transfer Attachments?

This feature moves attachments stored in Business Central's native attachment storage to SharePoint:

  • Attachments currently stored in BC
  • Moved to corresponding SharePoint folders
  • Based on table mappings

When to Use

Use Transfer Attachments when:

  • Implementing SharePoint Connector
  • Migrating from BC attachments to SharePoint
  • Consolidating document storage
  • Moving historical documents

Prerequisites

Before Transfer

Ensure you have:

Requirement Status
SharePoint connection Configured and tested
Table mappings Set up for source tables
Destination folders Exist in SharePoint
Permissions Write access to SharePoint

Required Mappings

Attachments transfer to the mapped table's SharePoint folder:

Attachment On Needs Mapping For
Customer Customer table
Vendor Vendor table
Item Item table
Job Job table

Supported Tables

The report only supports tables whose primary key consists of a single field (such as Customer, Vendor, Item, and Job), plus two special cases: Sales Header (table 36) and Purchase Header (table 38). If an attachment belongs to any other table with a multi-field primary key, the report stops with an error.

Running the Transfer

Accessing Transfer Report

The report cannot be found with Tell Me search. Run it from the SharePoint Table Mapping pages:

  1. Open the SharePoint Table Mapping list or card
  2. Choose the Transfer Attachments to SharePoint action

Setting Filters

Configure what to transfer using the request-page filters on the Document Attachment table:

Filter Purpose
Table ID Which table's attachments
No. Specific records
Attached Date Date range
Document Type / User Further narrowing

Running the Transfer

  1. Set your filters
  2. Click OK to run
  3. Report processes attachments
  4. Files are copied to SharePoint
  5. Progress may be displayed

Transfer Process

What Happens

For each attachment:

  1. Read attachment from BC storage
  2. Determine destination folder (from mapping)
  3. Upload file to SharePoint
  4. Continue to next attachment

The report only uploads -- it does not delete or modify the original BC attachment. The source attachment remains in Business Central after transfer; if you want to remove it, do so manually.

File Naming

Transferred files keep their original names, with name sanitizing applied:

  • Filename passed through the connector's name sanitizing -- special characters not allowed by SharePoint are replaced
  • Extension preserved
  • No other renaming

Example Transfer

Customer Attachments

Transferring customer attachments:

  1. Run Transfer Attachments to SharePoint from the SharePoint Table Mapping page
  2. Filter: Table ID = 18 (Customer)
  3. Optionally filter specific customers
  4. Run the transfer
  5. Attachments appear in customer SharePoint folders

Result

Before: Attachment stored in BC on Customer record After: File in /Customers/[Customer Name]/filename.ext

Scale Considerations

Large Transfers

For many attachments:

Consideration Recommendation
Time Allow sufficient time
Batching Process in smaller groups
Connectivity Ensure stable connection
Timeouts Monitor for failures

Batch Processing

For large migrations:

  1. Filter by date range
  2. Or filter by record range
  3. Process in chunks
  4. Verify each batch
  5. Continue to next

Token Refresh

For long-running transfers:

  • OAuth tokens may expire
  • Connector handles refresh
  • Very long transfers may need restarts

Error Handling

During Transfer

If any single upload fails, the entire run stops immediately with an error. Nothing is logged and no attachments are skipped -- the report simply aborts at the failing attachment.

Scenario Behavior
Single file fails Entire run stops with an error
Connection lost Entire run stops with an error
Unsupported table (multi-field primary key) Entire run stops with an error

After a Failed Run

  1. Fix the cause of the error (mapping, permissions, file, connectivity)
  2. If a specific record keeps failing, narrow the request-page filters to exclude it
  3. Re-run the report

The report does not keep track of which attachments have already been transferred, so a re-run processes every attachment matching the filters again. Files that already exist in the SharePoint folder are left untouched (they are not overwritten), so re-running is safe -- but narrowing the filters to the remaining records avoids unnecessary re-processing.

Common Errors

Error Cause Resolution
Folder not found Missing mapping Create table mapping
Permission denied SP permissions Grant access
File too large Size limits Check file size
Network error Connectivity Check connection

Verification

After Transfer

Verify the transfer:

  1. Open sample records in BC
  2. Check SharePoint FactBox
  3. Verify files appear
  4. Open files to confirm content

Checklist

Check Method
Files present Look in FactBox
Content correct Open and verify
All records Spot check various records
Count matches Compare totals

Options and Settings

BC Attachment Retention

The Transfer Attachments report is upload-only -- the original attachment is never deleted or altered in Business Central. After a successful transfer the file exists in both places (BC storage and SharePoint). If you want to free BC storage, delete the BC attachments manually once you have verified the SharePoint copies.

Best Practices

Planning

  1. Inventory - Know how many attachments
  2. Test - Try small batch first
  3. Verify - Check results before continuing
  4. Communicate - Inform users

Migration Strategy

Phase Action
1. Prepare Set up mappings, test connection
2. Pilot Transfer one table/few records
3. Verify Confirm successful
4. Expand Transfer more tables
5. Complete Final verification

During Migration

  • Run during off-peak hours
  • Monitor progress
  • Be prepared to pause
  • Document any issues

Post-Migration

  • Verify completeness
  • Train users on new location
  • Consider disabling BC attachments
  • Monitor SharePoint usage

Alternative: Manual Transfer

If automated transfer isn't suitable:

  1. Download attachments from BC
  2. Upload to SharePoint manually
  3. More control, more effort