Logo de Bc Dataverse Mapping Generator

Bc Dataverse Mapping Generator

Comunidade
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.

Visão geral

Publicado porfernandoartalf
RepositórioAL-Copilot-Skills-Collection
Nome da habilidadebc-dataverse-mapping-generator
Estrelas
28
Forks
8
Arquivos incluídos
4
LicençaMIT
Links
  • Instruções em Markdown

    Um arquivo SKILL.md que o modelo carrega sob demanda, consumindo tokens apenas quando uma solicitação é realmente relevante para a habilidade.

  • Funciona com qualquer LLM

    As habilidades de IA são escritas em Markdown simples, não em código específico de um provedor. Por isso, funcionam com GPT, Claude, Gemini, Grok ou um modelo local.

  • Arquivos incluídos: 4

    Scripts, templates e referências que o modelo pode ler enquanto trabalha. Os arquivos são somente para leitura e nunca são executados.

  • Código aberto

    Publicada por fernandoartalf no GitHub. Leia os arquivos da habilidade antes de instalá-la.

Instalação

Instale a habilidade de IA Bc Dataverse Mapping Generator no TypingMind para usá-la com qualquer LLM ou adicione-a a outro agente que leia SKILL.md.

1

Instalar no TypingMind

O TypingMind instala uma habilidade diretamente da pasta dela no GitHub — lê o arquivo SKILL.md, reúne os arquivos de recursos em um pacote e armazena o resultado localmente.

  1. Abra o app e vá para Plugins → Habilidades.
  2. Escolha "Instalar do GitHub".
  3. Cole a URL abaixo, que aponta para a pasta da habilidade, e confirme.
    https://github.com/fernandoartalf/AL-Copilot-Skills-Collection/tree/main/skills/bc-dataverse-mapping-generator
  4. Ative a habilidade em cada chat em que quiser disponibilizá-la.
Plugins → Habilidades → Adicionar habilidade → Via URL do GitHub. Depois, cole a URL da pasta e pressione Continuar.
2

Instalar em outro agente

Qualquer agente que leia o formato Agent Skills pode usar esta habilidade — copie a pasta para o diretório de habilidades desse 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
Reinicie Claude Code após copiar para que a nova habilidade seja reconhecida.

Use no TypingMind

Ative Bc Dataverse Mapping Generator em qualquer chat do TypingMind e o modelo cuida do resto. O nome e a descrição da habilidade ficam no prompt do sistema e, assim que uma solicitação relevante aparece, o modelo carrega as instruções completas automaticamente — sem precisar de acionamento manual e sem consumir tokens até que ela seja realmente usada.

O modelo carrega Bc Dataverse Mapping Generator automaticamente assim que uma solicitação é relevante para essa habilidade.

Funciona com qualquer modelo de IA

Habilidades de IA são instruções em Markdown simples, não código específico de um provedor. Por isso, Bc Dataverse Mapping Generator não fica vinculada ao modelo para o qual foi criada. Instale-a uma vez no TypingMind e use-a com GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama ou um modelo local executado por conta própria — tudo com suas próprias chaves de API.

  • Carregada apenas quando necessário

    O prompt do sistema contém apenas o nome e a descrição. As instruções são buscadas na primeira solicitação relevante, então uma habilidade sem uso não gera custo.

  • Troque de modelo durante a conversa

    Como a habilidade é composta de instruções, não de código, trocar de modelo não afeta seu funcionamento — o próximo modelo lê o mesmo arquivo SKILL.md.

Instruções da habilidade

Este é o conteúdo de SKILL.md que o modelo carrega. Leia antes de instalar — uma habilidade é um conjunto de instruções que seu 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

Arquivos incluídos

O modelo lê esses arquivos sob demanda enquanto a habilidade está carregada. Eles são disponibilizados para leitura e nunca são executados.

Perguntas frequentes

O que a habilidade de IA Bc Dataverse Mapping Generator faz?

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 que usar Bc Dataverse Mapping Generator no TypingMind?

Porque basta instalar uma vez para usar com qualquer modelo. A habilidade Bc Dataverse Mapping Generator é escrita em Markdown simples, e não em código específico de um provedor, então a mesma habilidade funciona com GPT-5, Claude, Gemini, Grok ou um modelo local — e é possível trocar de modelo no meio do chat sem que ela deixe de funcionar. No TypingMind, você usa suas próprias chaves de API e paga diretamente aos provedores, em vez de pagar uma assinatura por licença de usuário. Suas habilidades e chats permanecem no seu próprio armazenamento.

Como instalar Bc Dataverse Mapping Generator no TypingMind?

Abra Plugins → Habilidades → Instalar do GitHub no TypingMind e cole https://github.com/fernandoartalf/AL-Copilot-Skills-Collection/tree/main/skills/bc-dataverse-mapping-generator. O TypingMind lê o arquivo SKILL.md, reúne os arquivos da habilidade e a instala para que possa ser ativada em cada chat.

Quais modelos de IA podem usar Bc Dataverse Mapping Generator?

Qualquer modelo conectado no TypingMind. As habilidades de IA são instruções em Markdown simples, e não código específico de um provedor. Assim, GPT, Claude, Gemini, Grok e modelos locais podem carregar esta habilidade quando uma solicitação corresponder a ela.

Quantos modelos de IA posso usar com Bc Dataverse Mapping Generator?

Quantos quiser. Desde que o modelo ofereça suporte a habilidades, é possível usar Bc Dataverse Mapping Generator com ele — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama e outros — tudo no TypingMind com suas próprias chaves de API.

A habilidade de IA Bc Dataverse Mapping Generator é gratuita?

Sim. A habilidade é publicada no GitHub por fernandoartalf sob a licença MIT. O pagamento é feito apenas ao seu provedor de IA pelos tokens usados.

O que são habilidades de IA?

Uma habilidade de IA é um conjunto reutilizável de instruções que ensina um modelo de IA a realizar uma tarefa específica. Ela segue o formato aberto Agent Skills: um arquivo SKILL.md com nome e descrição, além de scripts, templates ou arquivos de referência de que o modelo possa precisar. O modelo lê as instruções apenas quando sua solicitação corresponde à habilidade, então uma habilidade instalada não gera custos até ser usada.

Qual é a diferença entre habilidades de IA e plugins ou servidores MCP?

Um plugin ou servidor MCP oferece ao modelo novas ferramentas que ele pode acionar — código que é executado em algum lugar e retorna um resultado. Já uma habilidade de IA dá ao modelo o conhecimento e as orientações de que ele precisa: como abordar uma tarefa, quais etapas seguir e como deve ser um bom resultado. As habilidades são escritas em Markdown simples, por isso não precisam de servidor, chave de API nem ambiente de execução, e funcionam com qualquer modelo.

Ver lista completa

Crie seu próprio espaço de trabalho com IA agora

Inscreva-se na nossa newsletter para receber avisos sobre novos recursos e futuros sorteios 👇