SharePoint Connector Documentation
Index

Creating Empty Folders

The SharePoint Connector can create folder structures in SharePoint before documents are uploaded. This page explains how to pre-create folders for your records.

Why Create Empty Folders?

Use Cases

Scenario Benefit
Migration preparation Folders ready for uploads
Consistent structure Same folders for all records
User guidance Users see where to put files
SharePoint setup Pre-configure permissions

When to Use

Create empty folders when:

  • Starting SharePoint Connector implementation
  • Ensuring consistent folder structure
  • Setting up permissions per folder
  • Preparing for manual file migration

Folder Creation Methods

Method 1: First Upload

Folders are typically created on first file upload:

  1. User uploads file to a record
  2. Connector creates folder if it doesn't exist
  3. File is placed in new folder

Method 2: Create Empty Folders Report

Use a report to bulk-create folders:

  1. Open the SharePoint Table Mapping list or card
  2. Run the Create Empty Folders action
  3. Select which records to include
  4. Folders are created in SharePoint

Method 3: Automatic Subfolder Creation

Configure auto-create subfolders:

  1. Set up Auto-Create Subfolders
  2. When record is mapped, subfolders created
  3. Consistent structure across records

Using Create Empty Folders

Accessing the Report

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

  1. Open the SharePoint Table Mapping list or card
  2. Select the mapping for the table you want
  3. Choose the Create Empty Folders action

The table is fixed by the mapping you start from and cannot be changed on the request page.

The Request Page

Field Description
Table The table folders are created for (read-only)
Record Selection Assist-edit (...) that opens a filter builder to select which records to include
Create Sub folders (in record folders) Also create the auto-create subfolders configured for the table (off by default)
Record count Number of records matching the current selection (read-only)

There are no ordinary per-field filter rows on the request page -- use the Record Selection assist-edit to build filters.

Running the Report

  1. Optionally set a record selection
  2. Click OK
  3. Accept the confirmation dialog ("Create empty folder for X records...") -- it defaults to No, so choose Yes to proceed
  4. Report processes records
  5. Folders created in SharePoint, progress shown

What Gets Created

Folder Structure

Based on your mapping configuration:

Mapping Created Structure
Simple /Customers/Contoso Ltd/
With spec /Customers/Contoso Ltd (C00010)/
With subfolders /Customers/Contoso Ltd/Invoices/

Auto-Create Subfolders

Subfolders are created only when the Create Sub folders (in record folders) checkbox on the request page is ticked (it is off by default) and the table has auto-create subfolders configured:

/Customers/Contoso Ltd/
├── Contracts/
├── Invoices/
├── Quotes/
└── Correspondence/

Bulk Folder Creation

For All Records

To create folders for all records:

  1. Leave the Record Selection empty
  2. Run the report
  3. All records in the mapped table get folders

For Specific Records

To create for specific records:

  1. Build a Record Selection with the assist-edit
  2. Only matching records processed
  3. More controlled approach

Example Scenarios

Goal Record Selection
All customers No selection (empty)
Active customers only Customer.Blocked = No
Customers by region Customer.Country = "US"
Specific range Customer.No. = "C00001..C00050"

Verification

After Creation

Verify folders were created:

  1. Open SharePoint document library
  2. Navigate to base folder
  3. Check folders exist
  4. Verify naming is correct

In Business Central

Check from BC:

  1. Open sample records
  2. Look at SharePoint FactBox
  3. Should show empty folder
  4. Path should be correct

Considerations

Existing Folders

If folder already exists:

  • No duplicate created
  • Existing folder is used
  • Content is preserved

Folder Naming

Folders are named based on:

  • Mapping configuration
  • Caption Field value
  • Caption Specification value (if set)
  • Name sanitizing setting

Permission Setup

After creating folders:

  • Default permissions apply
  • Can customize per folder in SharePoint
  • Consider permission strategy

Best Practices

Planning

Before bulk creation:

  1. Verify mappings - Ensure correct configuration
  2. Test with few - Create for 5-10 records first
  3. Check results - Verify naming, location
  4. Then proceed - Create remaining folders

Naming Review

Before bulk creation:

  • Review Caption Field selection
  • Check for naming collisions
  • Consider special characters
  • Test name sanitizing effect

Incremental Approach

Phase Records
1 Test batch (10 records)
2 Small production batch (100)
3 Remaining records

Troubleshooting

Folders Not Created

Check Resolution
Mapping exists? Create table mapping
Mapping active? Verify configuration
SharePoint connected? Test connection
Permissions? Check SP permissions

Wrong Names

Issue Check
Missing part Caption/Specification fields set?
Special characters Name sanitizing setting
Unexpected format Review mapping method

Connection Errors

Error Action
Auth failed Re-authenticate
Timeout Try smaller batch
Permission denied Check SP permissions

Integration with Migration

Migration Workflow

  1. Create empty folders - This step
  2. Transfer attachments - Move existing files
  3. Configure auto-upload - For new documents
  4. Train users - On new process

Order of Operations

Step Action
1 Configure mappings
2 Create empty folders
3 Set up subfolders
4 Transfer existing files
5 Enable auto-upload