Multi-Site Folder Mapping
The SharePoint Connector supports routing different tables to different SharePoint sites. This page explains how to configure multi-site mappings.
Multi-Site Overview
What is Multi-Site Mapping?
Multi-site mapping allows different Business Central tables to use different SharePoint sites:
| BC Table | SharePoint Site |
|---|---|
| Customer | https://contoso.sharepoint.com/sites/sales |
| Vendor | https://contoso.sharepoint.com/sites/purchasing |
| Job | https://contoso.sharepoint.com/sites/projects |
When to Use Multi-Site
- Departmental separation: Different teams use different sites
- Security requirements: Different access controls per site
- Organization structure: Sites match company structure
- Geographic distribution: Regional sites for regional data
Architecture
Site Hierarchy
SharePoint Tenant: contoso.sharepoint.com
├── /sites/sales/
│ └── Shared Documents/
│ └── Customers/
├── /sites/purchasing/
│ └── Shared Documents/
│ └── Vendors/
└── /sites/projects/
└── Shared Documents/
└── Projects/
Configuration Levels
| Level | Configuration | Purpose |
|---|---|---|
| Default | SharePoint Setup | Default site for all tables |
| Table Override | Table Mapping | Site for specific table |
| Conditional Override | Alternative Mapping | Site based on conditions |
Configuring Multi-Site
Step 1: Configure Default Site
In SharePoint Setup:
| Field | Value |
|---|---|
| Base URL | https://contoso.sharepoint.com |
| Subsite Name | (default site, e.g., sites/main) |
| Document Library (base folder) | Shared Documents |
This is the default for tables without overrides.
Step 2: Override Site in Table Mapping
For tables that should use a different site:
- Open SharePoint Table Mapping
- Edit or create the mapping
- Fill in both override fields:
| Field | Value | Notes |
|---|---|---|
| Site Name (Override) | sites/sales |
Different site path |
| Document Library (Override) | Shared Documents |
Required whenever Site Name (Override) is filled |
Important: Whenever you override the Site Name, you must also fill in the Document Library (Override). A mapping with a Site Name but an empty Document Library fails at runtime with the error
Mapping for <table> is missing a base folder, cannot continue!.
Step 3: Test Each Site
After configuration:
- Test connection from SharePoint Setup
- Open a record of each mapped table
- Verify the FactBox shows the correct site's content
Example Configuration
Scenario
- Sales documents → Sales site
- Purchasing documents → Purchasing site
- Projects → Projects site
- Everything else → Default site
SharePoint Setup (Default)
| Field | Value |
|---|---|
| Base URL | https://contoso.sharepoint.com |
| Subsite Name | sites/main |
| Document Library (base folder) | Shared Documents |
Table Mappings
Customers (Sales Site):
| Field | Value |
|---|---|
| Table No. | 18 |
| Folder Name | Customers |
| Site Name (Override) | sites/sales |
| Document Library (Override) | Shared Documents |
Vendors (Purchasing Site):
| Field | Value |
|---|---|
| Table No. | 23 |
| Folder Name | Vendors |
| Site Name (Override) | sites/purchasing |
| Document Library (Override) | Shared Documents |
Jobs (Projects Site):
| Field | Value |
|---|---|
| Table No. | 167 |
| Folder Name | Projects |
| Site Name (Override) | sites/projects |
| Document Library (Override) | Shared Documents |
Items (Default Site - no override):
| Field | Value |
|---|---|
| Table No. | 27 |
| Folder Name | Items |
| Site Name (Override) | (blank - uses default) |
Site Name Format
Correct Formats
Enter the Site Name without a leading slash:
| Site Type | Site Name Value | Example URL |
|---|---|---|
| Site collection | sites/sitename |
.../sites/sitename |
| Team site | teams/teamname |
.../teams/teamname |
| Nested subsite | sites/parent/child |
.../sites/parent/child |
| Subsite under root | BCDocs |
.../BCDocs |
| Root site | (leave blank) | ...sharepoint.com |
Valid Examples
| Scenario | Site Name Value |
|---|---|
| Site at /sites/BCDocs | sites/BCDocs |
| Team site at /teams/BCDocs | teams/BCDocs |
| Subsite directly under root | BCDocs |
| Root site (no subsite) | (leave blank) |
Common Mistakes
| Wrong | Correct | Issue |
|---|---|---|
/sites/sales |
sites/sales |
A leading slash is silently stripped -- enter the value without it |
/BCDocs |
BCDocs |
A leading slash is silently stripped -- enter the value without it |
https://contoso.sharepoint.com/sites/sales |
sites/sales |
Full URL not allowed |
sites/sales/ |
sites/sales |
Trailing slash not needed (silently stripped) |
Conditional Multi-Site
Using Alternative Mapping
You can route to different sites based on conditions:
| Table | Condition | Site Name |
|---|---|---|
| Customer | Country = US | sites/us-sales |
| Customer | Country = EU | sites/eu-sales |
| Customer | Country = APAC | sites/apac-sales |
Configuration
In Alternative Mapping:
| Table No. | Test Field | Match Value | Site Name | Base Folder | Folder Name |
|---|---|---|---|---|---|
| 18 | Country | US | sites/us-sales | Shared Documents | Customers |
| 18 | Country | DE | sites/eu-sales | Shared Documents | Customers |
| 18 | Country | JP | sites/apac-sales | Shared Documents | Customers |
Note: On the Alternative Mapping page, the Site Name and Base Folder fields are hidden by default -- personalize them onto the page before configuring conditional multi-site routing. Whenever an alternative sets a Site Name, a Base Folder must also be in effect (on the alternative, or as a Document Library override on the table mapping); otherwise folder resolution fails with a "missing a base folder" error.
Authentication Considerations
Single Authentication
With proxy authentication:
- The proxy account needs access to all sites
- Same credentials access all sites
Personal Authentication
With personal authentication:
- Each user needs access to the sites they use
- Users may be prompted for each site on first access
Permission Requirements
Ensure the authenticated account has permissions on all configured sites:
| Site | Required Permission |
|---|---|
| Default site | Read/Write |
| Each override site | Read/Write |
Multi-Site Best Practices
Planning
Before implementing:
- List all sites you'll need
- Map tables to sites in a planning document
- Verify permissions on all sites
- Test in sandbox before production
Site Organization
| Pattern | Description |
|---|---|
| By Department | Sales site, Purchasing site, HR site |
| By Region | US site, EU site, APAC site |
| By Function | Documents site, Archives site |
| By Security | Internal site, External site |
Documentation
Keep records of:
| Item | Document |
|---|---|
| Site list | All SharePoint sites used |
| Table assignments | Which table uses which site |
| Permissions | Who has access to what |
| Exceptions | Any alternative mappings |
Troubleshooting
Site Not Found
| Symptom | Check |
|---|---|
| Site not found error | Verify Site Name format |
| Access denied | Check permissions on the site |
| Empty FactBox | Verify Base Folder exists |
Wrong Site Appearing
| Symptom | Check |
|---|---|
| Default site instead of override | Is Site Name filled in Table Mapping? |
| Different site than expected | Check Alternative Mapping priority |
| Mixed results | Check for typos in Site Name |
Permission Issues
If users can't access certain sites:
- Verify they have SharePoint permissions
- Check if using Personal authentication
- Have user access site directly in browser to confirm access
Limitations
Current Limitations
| Limitation | Description |
|---|---|
| Same tenant only | All sites must be in same SharePoint tenant |
| Manual permission management | Must manage SP permissions separately |
| No automatic site creation | Sites must exist before mapping |
Cross-Tenant Scenarios
The connector does not support:
- Different SharePoint tenants
- SharePoint on-premises
- Mixed cloud scenarios