Batch Upload Operations
The SharePoint Connector provides batch upload functionality for uploading multiple documents at once. This page explains the batch upload features and how to use them.
Batch Upload Overview
Purpose
Batch upload allows you to:
- Upload historical documents in bulk
- Catch up on documents not auto-uploaded
- Process multiple documents efficiently
- Migrate existing documents to SharePoint
Available Batch Operations
| Action | Purpose |
|---|---|
| Batch Transfer Invoices to SharePoint | Upload sales invoices by filter |
| Batch Transfer Cr.Memos to SharePoint | Upload sales credit memos |
| Batch Transfer Purch. Invoices to SharePoint | Upload purchase invoices |
| Batch Transfer Purch Cr.Memos to SharePoint | Upload purchase credit memos |
Running Batch Uploads
Accessing Batch Reports
- Open a Table Mapping Card (any mapping — all four batch transfer actions appear on every card)
- Find the batch transfer actions in the Actions menu
Note: These are ProcessingOnly reports accessed as actions from the Table Mapping Card. They are not searchable by name in Business Central.
Setting Filters
Each batch report allows filtering:
| Filter | Purpose |
|---|---|
| No. | Specific documents |
| Posting Date | Date range |
| Bill-to Customer No. (sales) / Pay-to Vendor No. (purchase) | Specific party |
Running the Report
- Set your filters
- Click OK or Preview
- Report processes documents
- PDFs are generated and uploaded
- Progress may be shown
Batch Upload Sales Invoices
Running the Report
- Open a Table Mapping Card (these reports are not searchable because their
UsageCategoryisNone) - Run the Batch Transfer Invoices to SharePoint action
- Set filters:
- No. (invoice number range)
- Bill-to Customer No.
- Posting Date
- Run the report
- Invoices are uploaded to customer folders
Example Filter
To upload invoices from January 2024:
| Filter | Value |
|---|---|
| Posting Date | 01/01/2024..01/31/2024 |
Batch Upload Credit Memos
For Sales Credit Memos
- Open a Table Mapping Card
- Run the Batch Transfer Cr.Memos to SharePoint action
- Set filters for sales credit memos
- Run the report
- Credit memos uploaded to customer folders
Batch Upload Purchase Documents
Purchase Invoices
- Open a Table Mapping Card
- Run the Batch Transfer Purch. Invoices to SharePoint action
- Set filters for purchase invoices
- Run the report
- Invoices uploaded to vendor folders
Purchase Credit Memos
- Open a Table Mapping Card
- Run the Batch Transfer Purch Cr.Memos to SharePoint action
- Set filters for purchase credit memos
- Run the report
- Credit memos uploaded to vendor folders
Processing Behavior
How Batch Upload Works
- Report reads documents matching filter
- For each document:
- Generate PDF
- Determine destination folder
- Upload to SharePoint
- Apply metadata (if configured)
- Continue to next document
- Report completes
Folder Determination
For each document:
- Uses table mapping configuration
- Follows inherited dynamic logic
- Routes to configured subfolders
Scale Considerations
Large Batches
For many documents:
| Consideration | Recommendation |
|---|---|
| Time | Expect longer processing |
| Timeouts | May need multiple runs |
| Network | Ensure stable connection |
| Batching | Process in chunks |
Token Expiration
The batch reports call SP.VerifyAccess() once in OnPreDataItem, before iteration starts. There is no automatic mid-batch token refresh. For very large batches that risk hitting token expiry, split the run into smaller chunks (for example by Posting Date) and re-run.
Recommended Batch Sizes
| Scenario | Suggested Batch |
|---|---|
| Testing | 10-20 documents |
| Normal | 100-500 documents |
| Maximum | Depends on document size |
Error Handling
During Batch Processing
If an error occurs:
- That document may be skipped
- Processing continues with next
- Errors may be logged
- Report completes
After Batch Processing
- Review for any errors
- Check documents uploaded
- Identify any missed documents
- Re-run for specific failures
Common Batch Errors
| Error | Resolution |
|---|---|
| Timeout | Process smaller batch |
| Permission | Check SharePoint access |
| Folder missing | Verify mappings exist |
| Network | Check connectivity |
Verifying Batch Results
After Running
- Open sample documents
- Check SharePoint FactBox
- Verify PDFs present
- Check SharePoint directly
Spot Checking
Select random documents to verify:
- PDF was uploaded
- Correct folder location
- Metadata populated (if configured)
Best Practices
Planning Batch Uploads
| Step | Action |
|---|---|
| 1 | Estimate document count |
| 2 | Plan batch sizes |
| 3 | Test with small batch |
| 4 | Run during low-activity hours |
| 5 | Verify results |
Performance Tips
- Run during off-peak hours
- Start with smaller batches
- Monitor for errors
- Have stable network connection
Migration Strategy
For large migrations:
- Phase 1: Recent documents (current year)
- Phase 2: Previous year
- Phase 3: Historical archives
- Verify each phase before proceeding
Alternative: Transfer Attachments
For migrating existing BC attachments:
- Use "Transfer Attachments to SharePoint"
- Different from batch upload reports
- Moves attachment files, not generated PDFs
- See Transfer Attachments to SharePoint
Scheduling Batch Uploads
Manual Execution
Run batch reports manually as needed:
- On-demand processing
- Controlled execution
- Immediate feedback
Automated Scheduling
For recurring batch uploads:
- Consider job queue entries
- May require customization
- Contact partner for assistance