Logotipo de Bc Dataverse Mapping Generator

Bc Dataverse Mapping Generator

Comunidad
fernandoartalf
bc-dataverse-mapping-generator

Generates AL event subscriber code for Dataverse/CDS integration table and field mappings in Business Central. Creates all required event subscribers in the BCS Dataverse Events codeunit and lookup procedures in BCS Dataverse Support Funct. codeunit. Handles TWO distinct scenarios — (1) NEW CUSTOM entities (bcs_ prefix, custom BC table paired with CDS table, requiring full mapping with OnGetCDSTableNo, OnLookupCRMTables, OnAddEntityTableMapping, OnAfterResetConfiguration, lookup procedures, and label declarations) and (2) OOB entities (standard BC tables like Customer, Item, Contact mapped to existing CRM tables like CRM Account, CRM Product, CRM Contact, only requiring extra field mappings via AddNewExtraFieldMappings plus table extensions and page extensions). Use when asked to create sync mappings, set up Dataverse synchronization, add integration table mappings, map BC fields to Dataverse fields, wire up CDS coupling, connect BC tables to Dataverse entities, or add extra field mappings for standard entities.

Descripción general

Editorfernandoartalf
RepositorioAL-Copilot-Skills-Collection
Nombre de la habilidadbc-dataverse-mapping-generator
Estrellas
28
Forks
8
Archivos incluidos
4
LicenciaMIT
Enlaces
  • Instrucciones en Markdown

    Un archivo SKILL.md que el modelo carga cuando lo necesita, de modo que solo consume tokens cuando la petición encaja con la habilidad.

  • Funciona con cualquier LLM

    Las habilidades de IA están en Markdown, no en código específico de un proveedor, por lo que funcionan con GPT, Claude, Gemini, Grok o un modelo local.

  • Archivos incluidos: 4

    Scripts, plantillas y referencias que el modelo puede leer mientras trabaja. Los archivos son de solo lectura y nunca se ejecutan.

  • Código abierto

    Publicada por fernandoartalf en GitHub. Revisa el contenido original antes de instalarla.

Instalación

Instala la habilidad de IA Bc Dataverse Mapping Generator en TypingMind para usarla con cualquier LLM, o añádela a otro agente que lea SKILL.md.

1

Instalar en TypingMind

TypingMind instala una habilidad directamente desde su carpeta de GitHub: lee SKILL.md, empaqueta los archivos de recursos y guarda el resultado localmente.

  1. Abre la aplicación y ve a Plugins → Habilidades.
  2. Elige «Instalar desde GitHub».
  3. Pega la URL de la carpeta de la habilidad que se muestra a continuación y confirma.
    https://github.com/fernandoartalf/AL-Copilot-Skills-Collection/tree/main/skills/bc-dataverse-mapping-generator
  4. Activa la habilidad en cada chat en el que quieras tenerla disponible.
Plugins → Habilidades → Añadir habilidad → URL de GitHub; después, pega la URL de la carpeta y pulsa Continuar.
2

Instalar en otro agente

Cualquier agente que lea el formato Agent Skills puede usar esta habilidad: copia la carpeta en el directorio de habilidades de ese agente.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/fernandoartalf/AL-Copilot-Skills-Collection.git /tmp/AL-Copilot-Skills-Collection
mkdir -p .claude/skills
cp -r /tmp/AL-Copilot-Skills-Collection/skills/bc-dataverse-mapping-generator .claude/skills/bc-dataverse-mapping-generator
Reinicia Claude Code después de copiarla para que detecte la nueva habilidad.

Úsala en TypingMind

Activa Bc Dataverse Mapping Generator en cualquier chat de TypingMind y el modelo se encargará del resto. Su nombre y descripción se incluyen en el prompt del sistema y, en cuanto una petición encaja con la habilidad, el modelo carga las instrucciones completas por sí solo. No tienes que invocarla manualmente y no consume tokens hasta que se utiliza.

El modelo carga Bc Dataverse Mapping Generator automáticamente en cuanto una petición es relevante para esa habilidad.

Funciona con cualquier modelo de IA

Las habilidades de IA son instrucciones en Markdown, no código específico de un proveedor, por lo que Bc Dataverse Mapping Generator no está vinculada al modelo para el que se creó. Instálala una sola vez en TypingMind y úsala con GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama o un modelo local que ejecutes tú, todo con tus propias claves API.

  • Se carga solo cuando se necesita

    El prompt del sistema solo incluye el nombre y la descripción. Las instrucciones se cargan con la primera petición que encaja con la habilidad, por lo que una habilidad que no se usa no supone ningún coste.

  • Cambia de modelo durante el chat

    Como la habilidad contiene instrucciones y no código, cambiar de modelo no impide que funcione: el nuevo modelo lee el mismo archivo SKILL.md.

Instrucciones de la habilidad

Este es el contenido de SKILL.md que carga el modelo. Léelo antes de instalar la habilidad: contiene instrucciones que tu modelo seguirá.

Business Central Dataverse Mapping Generator

Generates AL event subscriber code to wire up Dataverse/CDS integration synchronization. Covers both custom entities (full mapping setup) and OOB entities (extra field mappings on standard CRM tables).

Prerequisites

  • CDS table exists in src/Table/ (TableType = CDS) or is a standard CRM table from the base application
  • For custom entities: corresponding BC table and CDS list page exist
  • Codeunits BCS Dataverse Events (70001) and BCS Dataverse Support Funct. (70002) exist
  • Permission set updated with table permissions

Step 1: Determine Entity Type

This is the critical first step. The entire workflow differs based on entity type.

IF the CDS table has TableType = CDS with ExternalName starting with "bcs_" or a custom prefix
   AND the BC table is a NEW custom table (not Customer, Item, Contact, Vendor, etc.)
   → Use CUSTOM ENTITY path (read references/custom-entity-mapping.md)

IF the BC table is a STANDARD base-app table (Customer, Item, Contact, Vendor, Opportunity, etc.)
   AND the CDS table is a standard CRM table (CRM Account, CRM Product, CRM Contact, CRM Opportunity)
   OR you are adding custom Dataverse fields to an existing standard sync
   → Use OOB ENTITY path (read references/oob-entity-mapping.md)
CriteriaCustom EntityOOB Entity
Dataverse entityCustom (bcs_ prefix)Standard CRM entity
BC tableNew custom tableStandard BC table (Customer, Item, etc.)
CDS table sourceGenerated via ALTPGenAlready in base application
Event subscribersFull set (5 events + lookup)Only AddNewExtraFieldMappings
Table extensionNot neededYes — to add custom fields to standard BC table
Page extensionNot neededYes — to expose custom fields on standard pages
Reference filereferences/custom-entity-mapping.mdreferences/oob-entity-mapping.md

Step 2: Read the Appropriate Reference

Based on entity type, read the corresponding reference file for complete code patterns, examples, and step-by-step instructions:

  • Custom entity: Read references/custom-entity-mapping.md
  • OOB entity: Read references/oob-entity-mapping.md

Step 3: Gather Entity Information

For Custom Entities

  1. BC Table Name (e.g., "BCS Department")
  2. CDS Table Name (e.g., "BCS CDS bcs_department")
  3. Entity Logical Name (e.g., "bcs_department")
  4. Primary Key Field (e.g., "bcs_departmentId")
  5. Field Mappings — BC field → CDS field with sync direction
  6. CDS List Page Name (e.g., "BCS CDS Departments")

For OOB Entities

  1. Standard BC Table (e.g., Item, Customer, Contact)
  2. CRM Table (e.g., CRM Product, CRM Account, CRM Contact)
  3. New Fields — custom Dataverse fields to map (e.g., "bcs_countryid")
  4. Sync Direction per field
  5. Standard Page to extend (e.g., Item Card, Customer Card)

Field Mapping Direction Reference

DirectionValueWhen to use
BidirectionalIntegrationFieldMapping.Direction::BidirectionalField updated from either system
To DataverseIntegrationFieldMapping.Direction::ToIntegrationTableBC is master for this field
From DataverseIntegrationFieldMapping.Direction::FromIntegrationTableDataverse is master for this field

Event Subscriber Summary

Custom Entity — All 5 Required

#EventCodeunitPurpose
1OnGetCDSTableNoCRM Setup DefaultsMaps BC table no. → CDS table no.
2OnLookupCRMTablesLookup CRM TablesRoutes lookup to support function
3OnAddEntityTableMappingCRM Setup DefaultsRegisters entity for coupling UI
4OnAfterResetConfigurationCDS Setup DefaultsCreates table + field mappings
5OnAfterAddExtraIntegrationFieldMappingsCDS Setup DefaultsAlready exists — no changes

Plus: Handle{Entity}Integration procedure, LookupCDS{Entity} procedure, Label declaration.

OOB Entity — Only Extra Field Mappings

#ChangeLocation
1Add field mapping callAddNewExtraFieldMappings in Support Funct.
2Create table extensionsrc/Table Extension/ — new field on standard BC table
3Create page extensionsrc/Page Extension/ — expose field on standard page

No new event subscribers needed — base application handles core sync.

Validation Checklist

Custom Entity

  • Case added to HandleOnGetCDSTableNo
  • Case added to HandleOnLookupCRMTables
  • Entity registered in HandleOnAddEntityTableMapping
  • Handle{Entity}Integration procedure created with table + field mappings
  • Call added in HandleOnAfterResetConfiguration
  • Label declared for mapping name
  • LookupCDS{Entity} procedure added to support functions
  • CDS list page has SetCurrentlyCoupled{Entity} procedure

OOB Entity

  • Table extension created with new field(s) in correct ID range
  • Field mapping added in AddNewExtraFieldMappings with CRM table guard
  • Page extension created to expose field(s)
  • Permission set updated
  • Mapping line commented with duplicate warning

Completion Output

Dataverse mapping generated for {Entity}

Type: {Custom Entity | OOB Entity Extra Fields}
BC Table: "{BC Table Name}"
CDS Table: "{CDS Table Name}"

Modified files:
- src/Codeunit/BCSDataverseEvents.Codeunit.al
- src/Codeunit/BCSDataverseSupportFunct.Codeunit.al
{- src/Table Extension/{file} (if OOB)}
{- src/Page Extension/{file} (if OOB)}

Field mappings:
| BC Field | CDS Field | Direction |
|----------|-----------|-----------|
| {field}  | {field}   | {dir}     |

Next steps:
- Build project (Ctrl+Shift+P → AL: Build)
- Reset Dataverse configuration (CDS Connection Setup → Reset Configuration)
- Run full synchronization to test

Archivos incluidos

El modelo los lee según los necesita mientras la habilidad está cargada. Son archivos de solo lectura y nunca se ejecutan.

Preguntas frecuentes

¿Qué hace la habilidad de IA Bc Dataverse Mapping Generator?

Generates AL event subscriber code for Dataverse/CDS integration table and field mappings in Business Central. Creates all required event subscribers in the BCS Dataverse Events codeunit and lookup procedures in BCS Dataverse Support Funct. codeunit. Handles TWO distinct scenarios — (1) NEW CUSTOM entities (bcs_ prefix, custom BC table paired with CDS table, requiring full mapping with OnGetCDSTableNo, OnLookupCRMTables, OnAddEntityTableMapping, OnAfterResetConfiguration, lookup procedures, and label declarations) and (2) OOB entities (standard BC tables like Customer, Item, Contact mapped...

¿Por qué usar Bc Dataverse Mapping Generator en TypingMind?

Porque la instalas una vez y la usas con cualquier modelo. Bc Dataverse Mapping Generator está escrita en Markdown, no en código específico de un proveedor, por lo que la misma habilidad funciona con GPT-5, Claude, Gemini, Grok o un modelo local, y puedes cambiar de modelo en mitad del chat sin que deje de funcionar. TypingMind utiliza tus propias claves API, de modo que pagas directamente a los proveedores en lugar de pagar una suscripción por puesto, y tus habilidades y chats permanecen en tu propio almacenamiento.

¿Cómo instalo Bc Dataverse Mapping Generator en TypingMind?

Abre Plugins → Habilidades → Instalar desde GitHub en TypingMind y pega https://github.com/fernandoartalf/AL-Copilot-Skills-Collection/tree/main/skills/bc-dataverse-mapping-generator. TypingMind lee el archivo SKILL.md de esa carpeta, empaqueta los archivos de la carpeta e instala el conjunto como una habilidad que puedes activar en cada chat.

¿Qué modelos de IA pueden usar Bc Dataverse Mapping Generator?

Cualquier modelo que conectes en TypingMind. Las habilidades de IA son instrucciones en Markdown, no código específico de un proveedor, por lo que GPT, Claude, Gemini, Grok y los modelos locales pueden cargar esta habilidad cuando una solicitud se corresponda con ella.

¿Con cuántos modelos de IA puedo usar Bc Dataverse Mapping Generator?

Con tantos como quieras. Siempre que un modelo admita habilidades, puedes usar Bc Dataverse Mapping Generator con él: GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama y muchos más, todos en TypingMind con tus propias claves API.

¿Es gratuita la habilidad de IA Bc Dataverse Mapping Generator?

Sí. fernandoartalf la ha publicado en GitHub bajo la licencia MIT. Solo pagas a tu proveedor de IA por los tokens que utilizas.

¿Qué son las habilidades de IA?

Una habilidad de IA es un conjunto de instrucciones reutilizables que enseña a un modelo de IA a realizar una tarea concreta. Sigue el formato abierto Agent Skills: un archivo SKILL.md con un nombre y una descripción, además de los scripts, plantillas o archivos de referencia que pueda necesitar el modelo. El modelo solo lee las instrucciones cuando tu solicitud se corresponde con la habilidad, por lo que una habilidad instalada no supone ningún coste hasta que se utiliza.

¿En qué se diferencian las habilidades de IA de los plugins o los servidores MCP?

Un plugin o un servidor MCP proporciona al modelo nuevas herramientas que puede invocar: código que se ejecuta en algún lugar y devuelve un resultado. En cambio, una habilidad de IA aporta conocimientos y procedimientos al modelo: cómo abordar una tarea, qué pasos seguir y qué se considera un buen resultado. Las habilidades son instrucciones en Markdown, por lo que no necesitan servidor, clave API ni entorno de ejecución, y funcionan con cualquier modelo.

Ver el directorio

Crea ya tu propio espacio de trabajo con IA

Suscríbete a nuestro boletín para recibir avisos sobre nuevas funciones y próximos sorteos 👇