Nested Folder Structures
The SharePoint Connector supports nested folder structures, allowing you to create hierarchical organization for your documents. This page explains how to configure and use nested folders.
Nested Folder Concepts
What Are Nested Folders?
Nested folders are subfolders within a record's main SharePoint folder:
/Customers/Contoso Ltd/
├── Contracts/ ← Subfolder
├── Invoices/ ← Subfolder
├── Correspondence/ ← Subfolder
└── Projects/ ← Subfolder
Benefits
| Benefit | Description |
|---|---|
| Organization | Categorize different document types |
| Findability | Easier to locate specific documents |
| Access Control | Can set different SP permissions per subfolder |
| Scalability | Handle many documents without clutter |
Auto-Create Subfolders
The connector can automatically create subfolders for your records.
Configuring Auto-Create Subfolders
- Open the Table Mapping Card (or the Table Mapping list) for the relevant table
- Click the Auto-create subfolders action
- Add entries for subfolders you want created
Note: The Auto-create subfolders page is not searchable in Business Central and is not part of SharePoint Setup -- it opens from the Auto-create subfolders action on the Table Mapping card or list, already linked to that table.
Auto-Create Subfolder Fields
| Field | Description | Example |
|---|---|---|
| Subfolder Name | Name of the subfolder | Invoices |
| First File Placement | Place the first uploaded file in this subfolder | Yes/No |
| Auto-upload folder | Use as destination for auto-uploads | Yes/No |
The table is supplied automatically by the page link from the Table Mapping -- there is no Table No. field to fill in.
Configuration Example
For Customer (table 18) subfolders, opened from the Customer table mapping:
| Subfolder Name | First File Placement | Auto Upload Folder |
|---|---|---|
| Contracts | No | No |
| Invoices | Yes | Yes |
| Quotes | No | No |
| Correspondence | No | No |
First File Placement
All subfolders in the list are always created together -- this setting does not control which subfolders get created. It only selects which subfolder the first uploaded file is placed in:
| Setting | Behavior |
|---|---|
| No | Subfolder is created, but the first uploaded file is not placed in it |
| Yes | Subfolder is created, and the first uploaded file is placed in this subfolder |
Auto-upload folder
When enabled:
- Automatically uploaded documents go to this subfolder
- Useful for routing invoices, quotes, etc.
- Only one subfolder per table should have this enabled
Manual Subfolder Creation
Users can create subfolders manually from SharePoint directly, or configure auto-create subfolders from the Table Mapping Card:
- Open the Table Mapping Card for the relevant table
- Click the Auto-create subfolders action
- Add the desired subfolder names
- Subfolders are created when files are uploaded to the record's folder, or on demand via the Create subfolders action in the SharePoint FactBox
Parent-Child Table Nesting
Hierarchical Table Relationships
Tables can have parent-child relationships that create nested structures:
Customer (Parent)
└── Job (Child)
└── Job Task (Grandchild)
Configuring Parent Relationships
In Table Mapping, configure:
| Field | Purpose |
|---|---|
| Parent Table No. | The parent table number |
| Parent Link Field 1 | Field linking to parent |
Example: Jobs Under Customers
If you want Job folders under Customer folders:
Customer Mapping:
| Field | Value |
|---|---|
| Table No. | 18 (Customer) |
| Folder Name | Customers |
| Mapping Method | Static |
Job Mapping:
| Field | Value |
|---|---|
| Table No. | 167 (Job) |
| Folder Name | Projects |
| Parent Table No. | 18 (Customer) |
| Parent Link Field 1 | (Bill-to Customer No.) |
Result:
/Customers/Contoso Ltd/
└── Projects/
├── Project Alpha/
└── Project Beta/
Document Subfolders
Routing Documents to Subfolders
Documents can be automatically placed in subfolders based on configuration:
- Auto-upload destination: Configure which subfolder receives auto-uploaded docs
- Template destination: Document templates can specify a subfolder
- Alternative mapping: Different document types to different subfolders
Example: Invoices to Invoice Subfolder
- Create Auto-Create Subfolder for "Invoices" with Auto Upload Folder = Yes
- Enable auto-upload for sales documents
- Posted invoices automatically go to the Invoices subfolder
Complex Nested Structures
Multi-Level Example
/Shared Documents/
└── Customers/
└── Contoso Ltd (C00010)/
├── Contracts/
│ ├── MSA.pdf
│ └── NDA.pdf
├── Invoices/
│ ├── 2024/
│ │ ├── INV-001.pdf
│ │ └── INV-002.pdf
│ └── 2025/
│ └── INV-003.pdf
├── Projects/
│ └── Project Alpha/
│ ├── Scope.docx
│ └── Timeline.xlsx
└── Correspondence/
└── Emails/
Creating This Structure
- Configure Customer mapping with auto-create subfolders
- Configure Job mapping as child of Customer
- Manual subfolders for additional organization (Emails, yearly folders)
Navigating Nested Folders
In the FactBox
Users navigate nested folders:
- Click a folder name to enter it
- Click ".." to go up one level
- Current path shows in the FactBox header
Path Display
The FactBox shows the current location:
/Customers/Contoso Ltd/Invoices/2024/- Users can see where they are in the hierarchy
Best Practices
Planning Your Structure
| Consideration | Recommendation |
|---|---|
| Depth | Keep to 3-4 levels maximum |
| Consistency | Use same structure across records |
| Naming | Use clear, consistent names |
| Permissions | Consider SharePoint permission inheritance |
Common Patterns
Customer-Centric:
/Customers/{Customer}/
├── Contracts/
├── Orders/
├── Invoices/
└── Communications/
Project-Centric:
/Projects/{Project}/
├── Planning/
├── Deliverables/
├── Reports/
└── Communications/
Document-Type-Centric:
/Documents/
├── Sales/
│ └── {Customer}/
├── Purchasing/
│ └── {Vendor}/
└── Projects/
└── {Job}/
Avoiding Over-Nesting
| Too Deep | Better |
|---|---|
| /A/B/C/D/E/F/file.pdf | /A/B/C/file.pdf |
| Many empty folders | Create folders when needed |
| Overly specific names | Use broader categories |
Limitations and Considerations
Path Length
SharePoint has path length limits:
- Keep folder and file names reasonable
- SharePoint's own guidance is to keep the total path under 400 characters -- this is a SharePoint platform limit, not one the connector enforces (the connector stores folder paths up to 500 characters and truncates anything beyond that)
- Long paths may cause errors
Folder Creation Timing
- Auto-create subfolders: Created when files are uploaded to the record's folder -- not when the record is first mapped. They can also be created via the Create subfolders action in the SharePoint FactBox, by auto-upload, or by the Create Empty Folders report when its "Create Sub folders (in record folders)" checkbox is selected
- Manual subfolders: Created on demand
- Child table folders: Created when child record is mapped
Performance
- Deep nesting may slow navigation
- Many subfolders in one folder may affect loading
- Keep structure practical