Service Assignment

NW Service Assignment — Manual

NW Service Assignment

Extension for Microsoft Dynamics 365 Business Central — niccoweb.com

v27.0.0.0
📋 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.

👤 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
💡 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.
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
  • 1
    Assign the Service Assignment permission set to the users who will use this extension.
  • 2
    Search for Service Assignment List in Business Central. On first open, 5 sample services are created automatically.
  • 3
    Click the Routes navigation action. On first open, 5 sample routes are created automatically.
  • 4
    Edit the Description of each service and route to match your real data and save.
🚀 How to Assign a Service
  • 1
    Open Service Assignment List. The drag-and-drop matrix loads at the bottom of the page.
  • 2
    Unassigned services appear as cyan cards in the top bar of the matrix.
  • 3
    Drag a service card and drop it onto the desired Route × Day cell.
  • 4
    The assignment is saved automatically. An X button appears on the card to remove it.
  • 5
    To reassign, drag the service directly from its current cell to a new one.
📦 AL Objects
TypeIDNameDescription
Table50120ServiceStores services with description and assignment coordinates (X = day, Y = route)
Table50121RouteStores the list of routes displayed as rows in the matrix
Page50120Service Assignment PartListPart page that hosts the Control Add-In with the drag & drop matrix
Page50121Service Assignment ListMain page — service list + matrix Add-In embedded as a part
Page50122RouteRoute catalog management (List type)
Codeunit50120Service Assignment Mgt.Builds the JSON arrays (services, routes, setup) sent to the Add-In on load
CtrlAddInService AssignmentJavaScript/HTML/CSS drag & drop matrix rendered inside Business Central
PermSet50120Service AssignmentRIMD permissions on all objects of the extension
🗂️ Data Model
Table — Service (50120)
FieldTypeDescription
IdIntegerAuto-increment primary key
DescriptionText[100]Service display name
Assigned To XText[20]Column assigned to (day number, zero-padded)
Assigned To YText[20]Row assigned to (Route Id)
AssignedBooleantrue when service has an active assignment
⚠️ A service cannot be deleted while Assigned = true.
Table — Route (50121)
FieldTypeDescription
IdIntegerAuto-increment primary key
DescriptionText[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.

DirectionNameParametersDescription
BC → JSsetServicesRoutesJServicesArray, JRoutesArray, JSetupInitial load — builds the full matrix grid
BC → JSupdateServicesJServicesArrayRefreshes service cards without rebuilding the grid
JS → BCAssignToRouteServiceId, X, YFired on drop — saves X/Y coordinates to the Service record
JS → BCRemoveAssignmentServiceIdFired on X button click — clears assignment from the record
📁 Add-In files: 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

Entradas populares