Service Assignment

NW Service Assignment — Manual

NW Service Assignment

Extensión para Microsoft Dynamics 365 Business Central — niccoweb.com

v27.0.0.0
📋 Información general
Publicadorniccoweb.com
Versión27.0.0.0
Runtime AL16.0
BC mínimov27.0
Rango de ID50120–50125
Tipo de interfazControl Add-In
ℹ️ ¿Qué hace esta extensión?
NW Service Assignment es una extensión de Business Central que proporciona una matriz interactiva de planificación mediante arrastrar y soltar, integrada directamente en una página de BC mediante un Control Add-In. Permite asignar visualmente servicios a rutas a través de varias columnas de días: basta con arrastrar una tarjeta de servicio y soltarla en la celda Ruta × Día deseada. Todas las asignaciones se guardan en tiempo real en la base de datos de BC.

👤 Usuario de BC
📄 Lista de asignaciónPágina principal
🧩 Control Add-InMatriz drag & drop
⚙️ Gestión de asignacionesCodeunit 50120
🗄️ Base de datos BCServicio y Ruta

Ruta
01
02
03
04
05
Ruta 1
Servicio 1
Servicio 2
Ruta 2
Servicio 3
Ruta 3
💡 La matriz muestra las rutas como filas y los números de día como columnas. Los servicios sin asignar aparecen como tarjetas en la barra superior. Cada celda puede contener un servicio.
Funciones principales
🖱️

Arrastrar y soltar

Arrastra las tarjetas desde la barra superior y suéltalas en cualquier celda Ruta × Día.

🔄

Reasignar

Mueve un servicio ya asignado a otra celda para reasignarlo al instante.

Eliminar asignación

Pulsa la X de un servicio asignado para devolverlo al grupo de disponibles.

📅

Hasta 100 columnas

La matriz admite hasta 100 columnas de días con desplazamiento horizontal.

📌

Cabeceras fijas

Las cabeceras permanecen visibles al desplazarse en cualquier dirección.

💾

Persistencia en tiempo real

Cada asignación se guarda inmediatamente en Business Central.

🔃

Actualizar

Usa la acción Actualizar para recargar los servicios sin salir de la página.

🛣️

Gestión de rutas

Administra el catálogo mediante la acción de navegación Rutas.

⚙️ Configuración inicial
  • 1
    Asigna el conjunto de permisos Service Assignment a los usuarios de la extensión.
  • 2
    Busca Service Assignment List en Business Central. En la primera apertura se crean automáticamente 5 servicios de ejemplo.
  • 3
    Abre la acción Routes. La primera vez se crean automáticamente 5 rutas de ejemplo.
  • 4
    Edita la descripción de cada servicio y ruta para adaptarlos a tus datos reales.
🚀 Cómo asignar un servicio
  • 1
    Abre Service Assignment List. La matriz se cargará en la parte inferior.
  • 2
    Los servicios sin asignar aparecen como tarjetas en la barra superior.
  • 3
    Arrastra una tarjeta y suéltala en la celda Ruta × Día deseada.
  • 4
    La asignación se guarda automáticamente y aparece un botón X para eliminarla.
  • 5
    Para reasignar, arrastra el servicio desde su celda actual a una nueva.
📦 Objetos AL
TipoIDNombreDescripción
Tabla50120ServiceAlmacena servicios, descripciones y coordenadas de asignación (X = día, Y = ruta)
Tabla50121RouteAlmacena las rutas mostradas como filas de la matriz
Página50120Service Assignment PartPágina ListPart que aloja el Control Add-In
Página50121Service Assignment ListPágina principal con lista de servicios y matriz integrada
Página50122RouteGestión del catálogo de rutas
Codeunit50120Service Assignment Mgt.Construye los arrays JSON de servicios, rutas y configuración
CtrlAddInService AssignmentMatriz JavaScript/HTML/CSS renderizada dentro de Business Central
PermSet50120Service AssignmentPermisos RIMD para todos los objetos de la extensión
🗂️ Modelo de datos
Tabla — Service (50120)
CampoTipoDescripción
IdIntegerClave primaria autoincremental
DescriptionText[100]Nombre visible del servicio
Assigned To XText[20]Columna asignada: número de día con ceros iniciales
Assigned To YText[20]Fila asignada: identificador de ruta
AssignedBooleantrue cuando existe una asignación activa
⚠️ Un servicio no puede eliminarse mientras Assigned = true.
Tabla — Route (50121)
CampoTipoDescripción
IdIntegerClave primaria autoincremental
DescriptionText[100]Nombre visible de la ruta
🧩 Arquitectura del Control Add-In
El Control Add-In Service Assignment está construido con HTML, CSS y JavaScript sin frameworks. Se comunica con Business Central mediante los eventos y procedimientos definidos en su declaración controladdin.

DirecciónNombreParámetrosDescripción
BC → JSsetServicesRoutesJServicesArray, JRoutesArray, JSetupCarga inicial y construcción de la matriz completa
BC → JSupdateServicesJServicesArrayActualiza las tarjetas sin reconstruir la matriz
JS → BCAssignToRouteServiceId, X, YSe ejecuta al soltar y guarda las coordenadas X/Y
JS → BCRemoveAssignmentServiceIdSe ejecuta al pulsar X y elimina la asignación
📁 Archivos del Add-In: start.js (inicialización del DOM) · service-mgt.js (matriz y drag/drop) · start.css (estilos)
🛡️ Permisos
El conjunto de permisos Service Assignment debe asignarse a todos los usuarios de la extensión:
📊 Datos de tabla — ServiceRIMD
📊 Datos de tabla — RouteRIMD
🗄️ Tabla — ServiceEjecutar
🗄️ Tabla — RouteEjecutar
⚙️ Codeunit — Service Assignment Mgt.Ejecutar
📄 Página — Service Assignment ListEjecutar
📄 Página — Service Assignment PartEjecutar
📄 Página — RouteEjecutar
📝 Requisitos previos
  • Business Central versión 27.0 o posterior.
  • Un navegador compatible con la API HTML5 Drag and Drop.
  • El conjunto de permisos Service Assignment asignado al usuario.
  • No se requieren dependencias externas ni API de terceros.

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