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:
- User uploads file to a record
- Connector creates folder if it doesn't exist
- File is placed in new folder
Method 2: Create Empty Folders Report
Use a report to bulk-create folders:
- Open the SharePoint Table Mapping list or card
- Run the Create Empty Folders action
- Select which records to include
- Folders are created in SharePoint
Method 3: Automatic Subfolder Creation
Configure auto-create subfolders:
- Set up Auto-Create Subfolders
- When record is mapped, subfolders created
- 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:
- Open the SharePoint Table Mapping list or card
- Select the mapping for the table you want
- 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
- Optionally set a record selection
- Click OK
- Accept the confirmation dialog ("Create empty folder for X records...") -- it defaults to No, so choose Yes to proceed
- Report processes records
- 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:
- Leave the Record Selection empty
- Run the report
- All records in the mapped table get folders
For Specific Records
To create for specific records:
- Build a Record Selection with the assist-edit
- Only matching records processed
- 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:
- Open SharePoint document library
- Navigate to base folder
- Check folders exist
- Verify naming is correct
In Business Central
Check from BC:
- Open sample records
- Look at SharePoint FactBox
- Should show empty folder
- 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:
- Verify mappings - Ensure correct configuration
- Test with few - Create for 5-10 records first
- Check results - Verify naming, location
- 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
- Create empty folders - This step
- Transfer attachments - Move existing files
- Configure auto-upload - For new documents
- 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 |