SharePoint Connector Documentation
Index

Adding Metadata Columns

The SharePoint Connector can populate SharePoint columns with Business Central data. This page explains how to configure metadata column mapping.

Metadata Overview

What is Metadata 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

Configuring Metadata Mapping

Accessing Mapping SharePoint Columns

The Mapping SharePoint Columns page is not searchable on its own. Open it from the table mapping:

  1. Open the SharePoint Table Mapping list or card
  2. Run the Metadata Columns action (Navigate menu)

Metadata Fields

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)

Creating a Metadata Mapping

  1. Open Mapping SharePoint Columns (from the table mapping's Metadata Columns action)
  2. Click New
  3. Select Mapping Table No. (e.g., 18 for Customer)
  4. Select Field No. (the BC field to map)
  5. Enter Column Name (SharePoint column name)
  6. Set SharePoint Field Type (data type)
  7. Configure Show in File List if desired
  8. 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:

  1. Configure the metadata mapping
  2. Run the Add Column To SharePoint action on the Mapping SharePoint Columns page
  3. 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:

  1. Go to SharePoint document library
  2. Library Settings > Create column
  3. Match name and type exactly
  4. Column is ready for use

Example Configurations

Customer Metadata

Field No. Column Name Type
1 (No.) CustomerNo Text
2 (Name) CustomerName Text
21 (Country) Country Text
22 (City) City Text

Invoice Metadata

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

Job Metadata

Field No. Column Name Type
1 (No.) JobNo Text
3 (Description) Description Text
52 (Status) Status Choice
56 (Starting Date) StartDate DateTime

Using Metadata in SharePoint

SharePoint Views

Create views filtered by metadata:

  1. Go to document library
  2. Create or edit view
  3. Add columns for display
  4. Add filters using metadata columns
  5. Save view

Example Views

View Name Filter
Active Customers Status = Active
2024 Invoices PostingDate in 2024
High Value Amount > 10000

Metadata enables search:

  • Search by customer name
  • Search by invoice number
  • Search by date range

Metadata Population

When Metadata is Populated

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

Updating Metadata

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

Performance

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