The SharePoint Connector can populate SharePoint columns with Business Central data. This page explains how to configure metadata column mapping.
Metadata mapping syncs BC field values to SharePoint columns:
| BC Field |
SharePoint Column |
| Customer.Name |
CustomerName |
| Invoice.Amount |
InvoiceTotal |
| Order.Order Date |
OrderDate |
Benefits
- Search: Find files by BC data in SharePoint
- Views: Create SharePoint views filtered by BC data
- Organization: Sort and group files by BC values
- Compliance: Store business data with documents
Accessing Mapping SharePoint Columns
The Mapping SharePoint Columns page is not searchable on its own. Open it from the table mapping:
- Open the SharePoint Table Mapping list or card
- Run the Metadata Columns action (Navigate menu)
| Field |
Type |
Description |
| Mapping Table No. |
Integer |
The BC table |
| Type |
Option |
Field or Column |
| Field No. |
Integer |
BC field number |
| SharePoint Field Type |
Option |
Data type (Integer, Text, Note, DateTime, Choice, Boolean, Number, URL) |
| Column Name |
Text |
SharePoint column name |
| Show in File List |
Option |
Display in FactBox ((blank), Category, Custom 1 through Custom 5) |
| Exported to SharePoint |
Boolean |
Whether the column has been created in SharePoint |
| Field Name |
FlowField |
BC field name (auto-populated) |
- Open Mapping SharePoint Columns (from the table mapping's Metadata Columns action)
- Click New
- Select Mapping Table No. (e.g., 18 for Customer)
- Select Field No. (the BC field to map)
- Enter Column Name (SharePoint column name)
- Set SharePoint Field Type (data type)
- Configure Show in File List if desired
- Save
Data Type Mapping
Supported SharePoint Field Types
| SharePoint Field Type |
SharePoint Column |
Use For |
| Integer |
Number (no decimals) |
Whole numbers |
| Text |
Single line of text |
Short text values |
| Note |
Multiple lines of text |
Long text |
| DateTime |
Date and time |
Dates |
| Choice |
Choice (dropdown) |
Limited options |
| Boolean |
Yes/No |
True/false values |
| Number |
Number (with decimals) |
Decimal amounts |
| URL |
Hyperlink |
Web links |
Choosing the Right Type
| BC Field Type |
Recommended SP Type |
| Code, Text |
Text |
| Description, Note |
Note |
| Integer, Option |
Integer |
| Decimal |
Number |
| Boolean |
Boolean |
| Date, DateTime |
DateTime |
Show in File List
Display Options
| Show in File List |
Effect |
| (blank) |
Not displayed in FactBox |
| Category |
Shows as Category column |
| Custom 1 |
Shows in Custom 1 column |
| Custom 2 |
Shows in Custom 2 column |
| Custom 3 |
Shows in Custom 3 column |
| Custom 4 |
Shows in Custom 4 column |
| Custom 5 |
Shows in Custom 5 column |
FactBox Display
When configured to show:
- Column appears in FactBox file list
- Shows value for each file
- Quick reference to BC data
One Field per Slot
Each Show in File List value can be assigned to only one field per mapping -- this applies to Category and to each of Custom 1 through Custom 5. Assigning a value that is already used by another field in the same mapping raises an error.
Category Column
- Appears as the Category column
- Usually reserved for file categories
- Consider using Custom columns for data
Exporting Columns to SharePoint
First-Time Setup
Columns must be created in SharePoint before values can be stored in them. Uploading files never creates columns -- uploads only fill values into columns that already exist. To create a column from Business Central:
- Configure the metadata mapping
- Run the Add Column To SharePoint action on the Mapping SharePoint Columns page
- Column appears in the SharePoint library
Exported to SharePoint Flag
The flag is set when the Add Column To SharePoint action successfully creates the column:
| Status |
Meaning |
| No |
Column not yet created via the action |
| Yes |
Column was created in SharePoint by the action |
Modifying a mapping line resets the flag to No.
Manual Column Creation
Alternatively, you can create the column directly in SharePoint:
- Go to SharePoint document library
- Library Settings > Create column
- Match name and type exactly
- Column is ready for use
Example Configurations
| Field No. |
Column Name |
Type |
| 1 (No.) |
CustomerNo |
Text |
| 2 (Name) |
CustomerName |
Text |
| 21 (Country) |
Country |
Text |
| 22 (City) |
City |
Text |
| Field No. |
Column Name |
Type |
| 3 (No.) |
InvoiceNo |
Text |
| 20 (Posting Date) |
PostingDate |
DateTime |
| 61 (Amount) |
Amount |
Number |
| 4 (Sell-to Customer No.) |
CustomerNo |
Text |
| Field No. |
Column Name |
Type |
| 1 (No.) |
JobNo |
Text |
| 3 (Description) |
Description |
Text |
| 52 (Status) |
Status |
Choice |
| 56 (Starting Date) |
StartDate |
DateTime |
SharePoint Views
Create views filtered by metadata:
- Go to document library
- Create or edit view
- Add columns for display
- Add filters using metadata columns
- Save view
Example Views
| View Name |
Filter |
| Active Customers |
Status = Active |
| 2024 Invoices |
PostingDate in 2024 |
| High Value |
Amount > 10000 |
SharePoint Search
Metadata enables search:
- Search by customer name
- Search by invoice number
- Search by date range
Metadata is populated when:
- File is uploaded
- Document is auto-uploaded
- Document is generated from template
What Values are Used
Values come from:
- The current record's field values
- At time of upload
- Based on mapping configuration
If BC data changes:
- Existing metadata is NOT auto-updated
- Re-upload or manual update needed
- SharePoint column remains static
Best Practices
Naming Conventions
| Practice |
Example |
| No spaces |
CustomerName not Customer Name |
| Consistent casing |
PostingDate or posting_date |
| Meaningful names |
InvoiceTotal not Field1 |
Column Selection
| Include |
Avoid |
| Searchable values |
Large text fields |
| Filter criteria |
Sensitive data |
| Reporting needs |
Frequently changing data |
| Consideration |
Recommendation |
| Number of columns |
Keep reasonable (5-10) |
| Large values |
Use Note sparingly |
| Updates |
Don't expect auto-sync |
Troubleshooting
Column Not Appearing
| Check |
Resolution |
| Mapping saved? |
Ensure configuration saved |
| Column created? |
Run Add Column To SharePoint (uploading files does not create columns) |
| Export done? |
Check Exported flag |
Wrong Values
| Issue |
Check |
| Empty values |
Field has data? |
| Wrong data |
Correct field number? |
| Truncated |
Field type appropriate? |
Type Mismatch
| Error |
Resolution |
| Can't store value |
Check type compatibility |
| Format error |
Verify date/number format |