Configuring Table Mappings
This guide provides step-by-step instructions for creating and managing table mappings in Cloud Replicator.
Creating a New Table Mapping
Step 1: Open Table Mapping Page
- Search for "Cloud Replicator Table Mapping" in Business Central
- Click to open the page
Step 2: Create New Record
- Click "New" in the action bar or press F3
- A new row appears in the list
Step 3: Configure Destination
- In the Destination column, click the dropdown
- Select your target (these are the exact captions shown in the dropdown):
- Azure Table Storage
- Azure Cosmos DB (TableDB API)
- Azure Cosmos DB (NO SQL API)
- Azure AI Search
- Or leave blank to use the default destination from Setup
Step 4: Select Table
- In the Table No. column, enter the table number directly
- OR click the lookup (three dots) to search
- If using lookup:
- The "All Objects" list appears
- Search or filter for your table
- Select and press Enter
- The Table Name will auto-populate
Step 5: Set Index
- The Index defaults to 0
- Change if creating multiple mappings for the same table/destination
- Use sequential numbers (0, 1, 2, etc.)
Step 6: Configure Options
Set the following based on your requirements:
| Option | When to Enable |
|---|---|
| Active | When ready to include in replications |
| Company Filter | To limit which companies are replicated |
| Per Day | When you need daily snapshots |
| SystemId as RowKey | For stable keys or AI Search |
| Replicate Deletions | When tracking deleted records |
Step 7: Activate
- Check the Active checkbox
- The table is now included in replication runs
Editing Table Mappings
Changing Configuration
- Navigate to the Table Mapping page
- Select the mapping to edit
- Modify fields directly in the list
- Changes save automatically
Changing Destination
To replicate to a different destination:
- You cannot change the destination of an existing mapping (it's part of the key)
- Instead:
- Create a new mapping with the new destination
- Deactivate or delete the old mapping
Changing Table
To replicate a different table:
- You cannot change the table of an existing mapping (it's part of the key)
- Instead:
- Create a new mapping for the new table
- Delete the old mapping if no longer needed
Configuring Company Filters
Filter All Companies
Leave the Company Filter field empty to replicate data from all companies.
Filter Specific Companies
Enter filter expressions to limit replication:
| Filter | Result |
|---|---|
CRONUS International Ltd. |
Only this company |
CRONUS* |
Companies starting with CRONUS |
Company A&#|;Company B |
Either Company A or Company B |
<>Test Company |
All except Test Company |
Multiple Filter Criteria
Use standard Business Central filter syntax:
| - ` | ` for OR |
|---|
&for AND*for wildcard<>for not equal..for range
Configuring Field Actions
After creating a table mapping, configure field-level actions:
Accessing Field Actions
- Select the table mapping
- Click the Field Actions value (shows count)
- Or click "Field Actions" in the action bar (if available)
What Field Actions Control
- Which fields to exclude from replication
- Fields to transform (e.g., unfold related data)
- Special handling for specific field types
See Field Actions Overview for details.
Deleting Table Mappings
Delete a Mapping
- Select the mapping row
- Click "Delete" or press Ctrl+Delete
- Confirm the deletion
Considerations Before Deleting
- Existing data in the cloud destination is NOT deleted
- Replication logs for the mapping remain
- Any scheduled jobs continue (update Job Queue if needed)
Running Manual Replications
Replicate All Active Tables
- Open Table Mapping page
- Click "Manual Run (All)" in the action bar
- All active mappings begin replicating
Replicate Selected Tables
- Select one or more mappings (use Ctrl+click for multiple)
- Click "Manual Run (Selected Tables)"
- Only selected mappings replicate
- Note: Selected tables don't need to be marked Active
Replicate Inactive Tables
Use "Manual Run (Selected Tables)" to test inactive mappings:
- Create and configure mapping
- Leave Active = No
- Select the mapping
- Run "Manual Run (Selected Tables)"
- Verify results before activating
Resetting Replication
When to Reset
Reset last replication when you need to:
- Force a full resync of all data
- Recover from sync issues
- Replicate historical changes
How to Reset
- Select the table mapping
- Click "Reset Last Replication"
- Confirm the action
- Next replication will process all records
What Happens
- The "last replication timestamp" is cleared
- Next run includes all records, not just changes
- Existing data in destination is overwritten (upsert)
Common Table Mapping Scenarios
Scenario 1: Basic Customer Replication
Destination: Azure Table
Table: 18 (Customer)
Active: Yes
Company Filter: (empty)
Per Day: No
SystemId as RowKey: No
Scenario 2: Sales Data for Analytics
Destination: Cosmos DB SQL
Table: 36 (Sales Header)
Active: Yes
Company Filter: CRONUS*
Per Day: Yes
SystemId as RowKey: Yes
Add SystemId to All Related: Yes
Scenario 3: Item Search
Destination: Azure AI Search
Table: 27 (Item)
Active: Yes
Company Filter: (empty)
Per Day: No (forced)
SystemId as RowKey: Yes (forced)
Scenario 4: Multi-Company Archive
Destination: Azure Table
Table: 21 (Cust. Ledger Entry)
Active: Yes
Company Filter: Production Company|Sales Company
Per Day: No
Replicate Deletions: No
Bulk Operations
Creating Multiple Mappings
Business Central doesn't support bulk creation, but you can:
- Create mappings one at a time
- Use Configuration Packages to export/import
- Create via AL code if needed
Updating Multiple Mappings
- Select multiple rows
- Some fields support multi-edit
- For complex changes, edit individually
Troubleshooting Table Mappings
Table Not Found
- Verify you have permissions to the table
- Check if the table exists in your Business Central version
- Ensure the table number is correct
Replication Fails
- Check the Replication Log for error details
- Verify cloud credentials in Setup
- Test with a smaller table first
- Enable Debug Mode for detailed troubleshooting
No Data Replicated
- Check Company Filter isn't too restrictive
- Verify the table has data in the filtered companies
- Check Active is set to Yes (or use Manual Run Selected)