Skip to main content

Bestway USA — Business Central Extensions

This repository contains the custom AL extensions and supporting projects for Bestway USA's Microsoft Dynamics 365 Business Central environment. Each top-level folder is an independent extension (or related project) that customizes BC for service management, eCommerce integration, warehouse operations, phone/email integrations, API exposure, and reporting.

Extensions

Core

FolderExtension NamePublisherID RangePurpose
BestwayUSA/BestwayUSAInnovia Consulting50100–50149Core customizations — 190+ objects covering service management, sales, warehouse, eCommerce, and reporting. Defines all INVC-prefixed custom fields and tables.
BW_DataAPIReport/BW_DataAPIReportBestway USA HG50000–59999Legacy data API and reporting. Has 20+ third-party dependencies (Dynamic Ship, Versapay, Continia, eCommerce, etc.).

Service & CRM

FolderExtension NamePublisherID RangePurpose
bc-csm-api/CSM API ToolkitBestway USA56100–56149Read-only OData v4 API for Service Orders, Lines, and Attachments (CSM integration).
bc-csm-api-test/CSM API TestsBestway USA56110–56119Automated test codeunits for the CSM API (unit + functional tests).
Service Order Lockout/Service Order LockoutSataware Technologies52400+Service order status management with lockout controls.
Customer Comments Update/Customer Comments UpdateSataware Technologies52000+Customer record comment update functionality.

Phone & Email Integration

FolderExtension NamePublisherID RangePurpose
Cambay Solutions_BC Dialing Application/BC Dialing ApplicationCambay Solutions60000–99999Nextiva phone/email integration — receives dialer events via API, syncs call summaries, recordings, and transcripts to Customer records via Azure Blob Storage.
BCDialingAzure/(Azure Function)C# Azure Function supporting the BC Dialing Application (not a BC extension).
E164 Phone Format/E164 Phone FormatBestway USA57100–57149E.164 phone number formatting for Customer records with bulk migration, preview, and rollback tooling.

Warehouse & Shipping

FolderExtension NamePublisherID RangePurpose
CostcoCarrierLabelBESTWAY/CostcoCarrierLabelBESTWAYBestwayUSAHG50100–69999Costco-specific carrier label report (Dynamic Ship integration).
DSGWarehouseCarrierLabel/DSGWarehouseCarrierLabelBestwayUSAHG59100–59149DSG warehouse carrier label report (Dynamic Ship integration).
WalmartWarehouseCarrierLabel_BestwayUSAHG_1.0.0.2/WalmartWarehouseCarrierLabelBestwayUSAHG59100–59149Walmart warehouse carrier label report (Dynamic Ship integration).

Reporting & Utilities

FolderExtension NamePublisherID RangePurpose
Quarterly Commissions Report/Sales Rep Commission ReportSataware Technologies55100–55149Sales rep quarterly commission reports (depends on Dynamics eShop).
PO Email Notification/PO - Email NotificationSataware Technologies80100–80149Sends notification emails when Purchase Orders are released, Warehouse Receipts are created, and Warehouse Receipts are posted.
Remove Data Filter For Sent Emails/Remove Data Filter For Sent EmailsSataware Technologies54000+Removes the default date filter on the Sent Emails list page.
BesywayInc/BesywayIncBesywayInc50900–50901Single-page extension (Change Tracking Base dependency).

Dependency Chain

BestwayUSA (Innovia Consulting, v27.0.0.0)
├── bc-csm-api (CSM API Toolkit)
│ └── bc-csm-api-test (CSM API Tests + Microsoft Library Assert)
└── BW_DataAPIReport (+ Dynamic Ship, Versapay, Continia, eCommerce, etc.)

Carrier Label Extensions (Costco, DSG, Walmart)
└── Dynamic Ship + IWorks Common (Insight Works)

Quarterly Commissions Report
└── eCommerce for Dynamics 365 Business Central (Dynamics eShop)

Standalone (no extension dependencies):
├── E164 Phone Format
├── BC Dialing Application (Cambay Solutions)
├── PO Email Notification
├── Service Order Lockout
├── Customer Comments Update
└── Remove Data Filter For Sent Emails

Development Setup

Prerequisites

  • VS Code with the AL Language extension
  • Access to a Business Central sandbox environment (v27.0+ for newer extensions, v25.0+ for legacy)
  • For BCDialingAzure/: .NET SDK and Azure Functions tooling

Getting Started

  1. Open the extension folder you want to work on in VS Code
  2. Create a .vscode/launch.json with your sandbox tenant, environment, and authentication details (this file is gitignored)
  3. Run AL: Download Symbols (Cmd+Shift+P) to pull base application and dependency symbols into .alpackages/
  4. Press F5 (or AL: Publish) to build and deploy to the sandbox

Object ID Ranges

Each extension has a reserved ID range defined in its app.json. Never reuse IDs across extensions. Check the idRanges in the extension's app.json and its README (if present) for the next available ID.

Naming Conventions

  • INVC prefix: Used on all BestwayUSA custom objects and fields (originally from Innovia Consulting)
  • File naming: {Prefix}{ObjectName}.{ObjectType}.al (e.g., INVCSerialNo.Table.al, INVCCustomerCard.PageExt.al)
  • Folder structure: Objects organized by type — Codeunit/, Table/, TableExt/, Page/, PageExt/, Enum/, EnumExt/, Report/, ReportExt/
  • Newer extensions (CSM API, E164) use namespace declarations (e.g., namespace BestwayUSA.bccsmapi;)

Testing

Automated tests exist for the CSM API extension (bc-csm-api-test/). Tests use BC's auto-rollback transaction model — test data is cleaned up automatically.

To run:

  1. Publish bc-csm-api to the sandbox
  2. Open bc-csm-api-test/ in VS Code, download symbols, then publish
  3. In the sandbox, navigate to the Test Tool page (130401)
  4. Add test codeunits 56111–56114 and run

Telemetry

Extension-level telemetry is configured for the following extensions via applicationInsightsConnectionString in their app.json. Telemetry flows to the Bestway USA Azure Application Insights resource alongside environment-level telemetry.

ExtensionTelemetry Configured
BC Dialing ApplicationYes
E164 Phone FormatYes
Customer Comments UpdateYes
PO Email NotificationYes
Service Order LockoutYes

Query extension telemetry in Log Analytics:

traces
| where customDimensions.extensionName == "BC Dialing Application"
| order by timestamp desc

Or across all instrumented extensions:

traces
| where customDimensions.extensionPublisher in ("Cambay Solutions", "Bestway USA", "Sataware Technologies")
| summarize count() by tostring(customDimensions.extensionName), bin(timestamp, 1h)

Deployment

To Sandbox

Press F5 in VS Code with the extension open — this builds and deploys in one step.

To Production

  1. Update the version in app.json
  2. Run AL: Package to build the .app file
  3. Deploy via the Extension Management page in BC or the Business Central Admin Center

Change Tracking

Change documents for significant modifications are stored alongside the affected extension. See:

  • Cambay Solutions_BC Dialing Application/CHANGE-001_Customer-Record-Lock-Fix.md