Change Document — Bestway CSM API Toolkit v1.1.0.0
Date: 2026-03-02 Extension: Bestway CSM API Toolkit Previous Version: 1.0.0.0 New Version: 1.1.0.0
Background
The CMS FAQ Management extension (Sataware Technologies) synchronizes Bestway's FAQ system with Business Central's fault reporting tables. To validate that synchronization programmatically — both during UAT and ongoing regression testing — the test automation framework needs read-only API access to the six fault tables and two posted document tables.
The existing bc-csm-api extension (v1.0.0.0) already exposes Service Orders, Service Order Lines, and Service Order Attachments under the bestway/csm/v1.0 API group. This update adds 8 new API pages following the same pattern, providing the data access layer for the CMS FAQ Management automated test suite.
Summary of Changes
| # | Category | Severity | Description |
|---|---|---|---|
| 1 | Added | Standard | Fault Area API (Page 56105) |
| 2 | Added | Standard | Symptom Code API (Page 56106) |
| 3 | Added | Standard | Fault Code API (Page 56107) |
| 4 | Added | Standard | Resolution Code API (Page 56108) |
| 5 | Added | Standard | Fault Resol. Relation API (Page 56109) |
| 6 | Added | Standard | FA Symptom Relation API (Page 56120) |
| 7 | Added | Standard | Posted Svc. Invoice Line API (Page 56121) |
| 8 | Added | Standard | Posted Svc. Shipment Line API (Page 56122) |
| 9 | Added | Standard | Application Insights telemetry in app.json |
| 10 | Changed | Standard | Migrated changelog to two-tier docs format |
| 11 | Changed | Standard | Reorganized AL files into type-based subfolders |
Detailed Changes
1–4. Fault Table APIs (Pages 56105–56108)
Four new API pages expose the standard BC fault reporting master tables: Fault Area (5915), Symptom Code (5916), Fault Code (5918), and Resolution Code (5919).
Each page follows the established bc-csm-api pattern:
PageType = API,Editable = false,ODataKeyFields = SystemId- Published under
bestway/csm/v1.0 - Exposes
Code,Description, andSystemId
These pages enable automated tests to query BC for the current state of fault data after a FAQ sync — verifying that codes exist, descriptions match, and counts are correct.
Pending: FAQ sync fields (FAQ ID, Active, Created in FAQ, Last Modified in FAQ, Created in BC, Last Modified in BC) will be added to these pages once the CMS FAQ Management extension field names are confirmed after sandbox deployment.
Files:
Page/FaultAreaAPI.Page.al(new)Page/SymptomCodeAPI.Page.al(new)Page/FaultCodeAPI.Page.al(new)Page/ResolutionCodeAPI.Page.al(new)
5. Fault/Resolution Code Relationship API (Page 56109)
Exposes the standard BC Fault/Resolution Code Relationship table (5920), which stores the many-to-many relationships between Fault Area, Symptom Code, Fault Code, and Resolution Code within a Service Item Group context.
Fields exposed: Fault Area Code, Symptom Code, Fault Code, Resolution Code, Service Item Group Code, Description, Occurrences, Created Manually.
Used by test cases TC-8.2 and TC-8.3 to validate that FAQ hierarchy relationships are correctly reflected in BC.
File: Page/FaultResolRelationAPI.Page.al (new)
6. Fault Area/Symptom Code Relationship API (Page 56120)
Exposes the custom BestwayUSA table INVC FA Symptom Code Relation (50113), which stores the many-to-many mapping between Fault Areas and Symptom Codes.
Fields exposed: Fault Area, Symptom Code, SystemId.
Note: The FlowField INVC Symptom Code Description is not exposed via the API because FlowFields require CalcFields execution and are not directly bindable on API pages.
File: Page/FASymptomRelationAPI.Page.al (new)
7–8. Posted Document Line APIs (Pages 56121–56122)
Two new API pages expose posted service document lines:
- Posted Svc. Invoice Line API (56121) — Service Invoice Line table (5993)
- Posted Svc. Shipment Line API (56122) — Service Shipment Line table (5991)
These enable test cases TC-9.1 and TC-9.2 (data safety) to verify that posted documents are not altered by FAQ sync operations. Fields include all standard fault code fields plus INVC custom fields (Bestway Serial No., Fault Code Description, etc.) on the invoice line page.
Files:
Page/PostedSvcInvoiceLineAPI.Page.al(new)Page/PostedSvcShipmentLineAPI.Page.al(new)
9. Application Insights Telemetry
Added the applicationInsightsConnectionString to app.json, aligning with the repo-wide requirement that all extensions send telemetry to Bestway's shared Application Insights resource.
10. Two-Tier Documentation Migration
Migrated from the single-file CHANGELOG.md in the extension root to the two-tier format under docs/:
docs/CHANGELOG.md— summary index with categorized entries and links to change documentsdocs/CHANGE-v1.1.0.0.md— this file, with detailed per-item analysis
11. File Reorganization
Reorganized all .al source files from the extension root into type-based subfolders, following the repo convention documented in the Contribution Guidelines:
Codeunit/— helper codeunits (1 file:CsmApiHelper.Codeunit.al)Page/— API page objects (11 files, renamed from{Name}.alto{Name}.Page.al)
The legacy root-level CHANGELOG.md was removed — it is fully superseded by docs/CHANGELOG.md.
The same reorganization was applied to the test extension (bc-csm-api-test/), moving all 5 test codeunits into Codeunit/.
Object Inventory
| Object ID | Type | Name | Source Table | Status |
|---|---|---|---|---|
| 56101 | Page | Service Order API | Service Header | Existing |
| 56102 | Page | Service Order Line API | Service Line | Existing |
| 56103 | Page | Serv. Order Attachment API | Document Attachment | Existing |
| 56104 | Codeunit | CSM API Helper | — | Existing |
| 56105 | Page | Fault Area API | Fault Area (5915) | New |
| 56106 | Page | Symptom Code API | Symptom Code (5916) | New |
| 56107 | Page | Fault Code API | Fault Code (5918) | New |
| 56108 | Page | Resolution Code API | Resolution Code (5919) | New |
| 56109 | Page | Fault Resol. Relation API | Fault/Resol. Cod. Relationship (5920) | New |
| 56120 | Page | FA Symptom Relation API | INVC FA Symptom Code Relation (50113) | New |
| 56121 | Page | Posted Svc. Invoice Line API | Service Invoice Line (5993) | New |
| 56122 | Page | Posted Svc. Shipment Line API | Service Shipment Line (5991) | New |
File Structure
bc-csm-api/
├── app.json
├── README.md
├── BestwayCSM.postman_collection.json
├── Codeunit/
│ └── CsmApiHelper.Codeunit.al (56104)
├── Page/
│ ├── ServiceOrderAPI.Page.al (56101)
│ ├── ServiceOrderLineAPI.Page.al (56102)
│ ├── ServiceOrderAttachmentAPI.Page.al (56103)
│ ├── FaultAreaAPI.Page.al (56105) ← new
│ ├── SymptomCodeAPI.Page.al (56106) ← new
│ ├── FaultCodeAPI.Page.al (56107) ← new
│ ├── ResolutionCodeAPI.Page.al (56108) ← new
│ ├── FaultResolRelationAPI.Page.al (56109) ← new
│ ├── FASymptomRelationAPI.Page.al (56120) ← new
│ ├── PostedSvcInvoiceLineAPI.Page.al (56121) ← new
│ └── PostedSvcShipmentLineAPI.Page.al (56122) ← new
└── docs/
├── CHANGELOG.md
└── CHANGE-v1.1.0.0.md
Known Limitations
-
FAQ sync fields not yet exposed. The CMS FAQ Management extension adds 6 fields to each fault table (FAQ ID, Active, Created/Modified timestamps). The exact field names are unknown until the compiled extension is deployed to the sandbox and symbols are downloaded. The API pages expose standard BC fields now and will be updated with FAQ sync fields in a patch release.
-
FlowField on table 50113 not exposed. The
INVC Symptom Code DescriptionFlowField on the FA Symptom Relation table cannot be directly bound on an API page. Tests that need this value should join the Symptom Code API data in the test layer. -
No subpage linking. Unlike the Service Order API (which links Lines and Attachments as subpages), the new fault table APIs are standalone entities. OData
$expandis not supported on these endpoints — each must be queried independently.
Deployment Notes
Pre-Deployment
- Ensure BestwayUSA extension v27.0.0.0 is published (dependency).
- Ensure CMS FAQ Management extension is published (for FAQ sync fields — not required for base fault table fields).
Deployment
- Build and publish bc-csm-api v1.1.0.0 to the sandbox via VS Code (
AL: Publish/ F5). - Verify all 12 pages are accessible in the API endpoint listing.
Post-Deployment Verification
- Query each new endpoint via Postman or curl to confirm data returns.
- Verify OData pagination works on tables with >100 records (Fault Codes, Resolution Codes).
- Confirm the Application Insights resource receives telemetry events from the extension.
Testing
The automated test suite for the CMS FAQ Management extension (CMS FAQ Management/test/) depends on these API pages. After deploying v1.1.0.0:
- Configure the test
.envfile with BC credentials. - Run
pytest -m tier2 -vto verify BC OData connectivity. - Run
pytest -m tier3 -vto verify cross-system (FAQ API + BC) tests.
The existing bc-csm-api-test extension (56110–56114) is not affected by this change — it tests the Service Order API pages, not the fault table pages.