Service Assignment
🗓️
NW Service Assignment
Extension for Microsoft Dynamics 365 Business Central — niccoweb.com
📋 General Information
Publisherniccoweb.com
Version27.0.0.0
AL Runtime16.0
Min. BCv27.0
ID Range50120–50125
UI TypeControl Add-In
ℹ️ What does this extension do?
NW Service Assignment is a Business Central extension that provides an interactive
drag-and-drop scheduling matrix embedded directly in a BC page via a
Control Add-In. It allows users to visually assign services to routes
across multiple day columns — simply drag a service card and drop it into the desired
Route × Day cell. All assignments are persisted in real time to the BC database.
💡 The matrix shows Routes as rows and day numbers as columns. Unassigned services appear as cyan cards in the top bar. Each cell can hold one service.
👤 BC User
→
📄 Service Assignment ListMain Page
→
🧩 Control Add-InDrag & Drop Matrix
→
⚙️ Service Assignment Mgt.Codeunit 50120
→
🗄️ BC DatabaseService & Route
Route
01
02
03
04
05
Route 1
Service 1
Service 2
Route 2
Service 3
Route 3
✨ Key Features
🖱️
Drag & Drop
Drag service cards from the top bar and drop them into any Route × Day cell.
🔄
Reassign
Drag an already assigned service to a different cell to move it instantly.
❌
Remove Assignment
Click the X button on an assigned service to unassign it and return it to the pool.
📅
Up to 100 Columns
The matrix supports up to 100 day columns, scrollable horizontally.
📌
Sticky Headers
Row and column headers remain visible while scrolling in any direction.
💾
Real-time Persistence
Every assignment is saved immediately to Business Central — no manual save needed.
🔃
Refresh
Use the Update action to reload services without leaving the page.
🛣️
Route Management
Manage the route catalog via the Routes navigation action.
⚙️ Initial Setup
-
1Assign the Service Assignment permission set to the users who will use this extension.
-
2Search for Service Assignment List in Business Central. On first open, 5 sample services are created automatically.
-
3Click the Routes navigation action. On first open, 5 sample routes are created automatically.
-
4Edit the Description of each service and route to match your real data and save.
🚀 How to Assign a Service
-
1Open Service Assignment List. The drag-and-drop matrix loads at the bottom of the page.
-
2Unassigned services appear as cyan cards in the top bar of the matrix.
-
3Drag a service card and drop it onto the desired Route × Day cell.
-
4The assignment is saved automatically. An X button appears on the card to remove it.
-
5To reassign, drag the service directly from its current cell to a new one.
📦 AL Objects
| Type | ID | Name | Description |
|---|---|---|---|
| Table | 50120 | Service | Stores services with description and assignment coordinates (X = day, Y = route) |
| Table | 50121 | Route | Stores the list of routes displayed as rows in the matrix |
| Page | 50120 | Service Assignment Part | ListPart page that hosts the Control Add-In with the drag & drop matrix |
| Page | 50121 | Service Assignment List | Main page — service list + matrix Add-In embedded as a part |
| Page | 50122 | Route | Route catalog management (List type) |
| Codeunit | 50120 | Service Assignment Mgt. | Builds the JSON arrays (services, routes, setup) sent to the Add-In on load |
| CtrlAddIn | — | Service Assignment | JavaScript/HTML/CSS drag & drop matrix rendered inside Business Central |
| PermSet | 50120 | Service Assignment | RIMD permissions on all objects of the extension |
🗂️ Data Model
Table — Service (50120)
⚠️ A service cannot be deleted while
| Field | Type | Description |
|---|---|---|
Id | Integer | Auto-increment primary key |
Description | Text[100] | Service display name |
Assigned To X | Text[20] | Column assigned to (day number, zero-padded) |
Assigned To Y | Text[20] | Row assigned to (Route Id) |
Assigned | Boolean | true when service has an active assignment |
Assigned = true.
Table — Route (50121)
| Field | Type | Description |
|---|---|---|
Id | Integer | Auto-increment primary key |
Description | Text[100] | Route display name |
🧩 Control Add-In Architecture
The Service Assignment Control Add-In is built with vanilla HTML, CSS, and JavaScript. It communicates with Business Central through events and procedures defined in its controladdin declaration.
📁 Add-In files:
| Direction | Name | Parameters | Description |
|---|---|---|---|
| BC → JS | setServicesRoutes | JServicesArray, JRoutesArray, JSetup | Initial load — builds the full matrix grid |
| BC → JS | updateServices | JServicesArray | Refreshes service cards without rebuilding the grid |
| JS → BC | AssignToRoute | ServiceId, X, Y | Fired on drop — saves X/Y coordinates to the Service record |
| JS → BC | RemoveAssignment | ServiceId | Fired on X button click — clears assignment from the record |
start.js (DOM initialisation) · service-mgt.js (matrix logic & drag/drop) · start.css (styles)
🛡️ Permissions
The Service Assignment permission set must be assigned to all users of this extension:
📊 Table Data — ServiceRIMD
📊 Table Data — RouteRIMD
🗄️ Table — ServiceExecute
🗄️ Table — RouteExecute
⚙️ Codeunit — Service Assignment Mgt.Execute
📄 Page — Service Assignment ListExecute
📄 Page — Service Assignment PartExecute
📄 Page — RouteExecute
📝 Prerequisites
- ✓Business Central version 27.0 or higher.
- ✓A browser that supports the HTML5 Drag and Drop API (all modern browsers qualify).
- ✓The Service Assignment permission set assigned to the user.
- ✓No external dependencies or third-party APIs required — the extension is fully self-contained.
Comentarios
Publicar un comentario