Bc Dataverse Mapping Generatorのロゴ

Bc Dataverse Mapping Generator

コミュニティ
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.

概要

公開者fernandoartalf
リポジトリAL-Copilot-Skills-Collection
スキル名bc-dataverse-mapping-generator
スター
28
フォーク
8
同梱ファイル
4
ライセンスMIT
リンク
  • Markdown形式の指示

    モデルが必要に応じて読み込むSKILL.mdファイルです。関連するリクエストがあったときだけトークンを消費します。

  • どのLLMでも利用可能

    AIスキルはプロバイダー固有のコードではなく、通常のMarkdownなので、GPT、Claude、Gemini、Grok、ローカルモデルで利用できます。

  • 4個の同梱ファイル

    モデルが作業中に読み取れるスクリプト、テンプレート、参考資料です。ファイルは読み取り専用で、実行されることはありません。

  • オープンソース

    fernandoartalfがGitHubで公開しています。インストールする前にソースを確認してください。

インストール

AIスキル「Bc Dataverse Mapping Generator」をTypingMindにインストールすれば、どのLLMでも利用できます。SKILL.mdを読み取れる別のAIエージェントに追加することもできます。

1

TypingMindにインストール

TypingMindはGitHubフォルダから直接スキルをインストールします。SKILL.mdを読み取り、リソースファイルをまとめてローカルに保存します。

  1. アプリを開き、「プラグイン」→「スキル」に移動します。
  2. 「GitHubからインストール」を選択します。
  3. 以下のスキルフォルダのURLを貼り付けて確定します。
    https://github.com/fernandoartalf/AL-Copilot-Skills-Collection/tree/main/skills/bc-dataverse-mapping-generator
  4. スキルを利用したいチャットごとに、そのスキルを有効にしてください。
「プラグイン」→「スキル」→「スキルを追加」→「GitHubのURLから」を選択し、フォルダのURLを貼り付けて「続行」を押します。
2

別のAIエージェントにインストール

Agent Skills形式を読み取れるAIエージェントなら、このスキルを利用できます。フォルダをそのAIエージェントのスキルディレクトリにコピーしてください。

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
コピー後、新しいスキルを読み込むためにClaude Codeを再起動してください。

TypingMindで使用

TypingMindのチャットでBc Dataverse Mapping Generatorを有効にするだけで、あとはモデルが対応します。名前と説明がシステムプロンプトに含まれ、関連するリクエストがあると、モデルが指示の全文を自動で読み込みます。手動で呼び出す必要はなく、実際に使用されるまでトークンを消費しません。

関連するリクエストがあるとすぐに、モデルが自動的にBc Dataverse Mapping Generatorを読み込みます。

どのAIモデルでも利用可能

AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、Bc Dataverse Mapping Generatorは作成時に想定されたモデルに縛られません。TypingMindに一度インストールすれば、ご自身のAPIキーを使って、GPT-5、Claude、Gemini、Grok、DeepSeek、Mistral、Llama、またはご自身で実行するローカルモデルで利用できます。

  • 必要なときだけ読み込み

    システムプロンプトには名前と説明だけが含まれます。関連するリクエストが初めてあったときに指示を取得するため、スキルを使わない間は指示の読み込みにトークンを消費しません。

  • チャットの途中でモデルを切り替え

    スキルはコードではなく指示なので、モデルを切り替えてもそのまま使えます。次のモデルも同じSKILL.mdを読み込みます。

スキルの指示

モデルが読み込むSKILL.mdの内容です。スキルはモデルが従う指示なので、インストールする前に確認してください。

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

同梱ファイル

スキルが読み込まれている間、モデルは必要に応じてこれらを読み取ります。読み取り可能なファイルとして提供され、実行されることはありません。

よくある質問

AIスキル「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...

TypingMindでBc Dataverse Mapping Generatorを使うメリットは何ですか?

一度インストールすれば、どのモデルでも使えるからです。Bc Dataverse Mapping Generatorはプロバイダー固有のコードではなく、通常のMarkdownで記述されているため、同じスキルをGPT-5、Claude、Gemini、Grok、ローカルモデルで利用できます。チャットの途中でモデルを切り替えても、そのまま使い続けられます。TypingMindは自分のAPIキーで動作するため、シート単位のサブスクリプションではなく、プロバイダーに直接料金を支払います。スキルとチャットは自分のストレージに保持されます。

TypingMindにBc Dataverse Mapping Generatorをインストールするにはどうすればよいですか?

TypingMindで「プラグイン」→「スキル」→「GitHubからインストール」を開き、https://github.com/fernandoartalf/AL-Copilot-Skills-Collection/tree/main/skills/bc-dataverse-mapping-generatorを貼り付けてください。TypingMindがSKILL.mdを読み込み、関連ファイルをまとめて、チャットごとに有効にできるスキルとしてインストールします。

Bc Dataverse Mapping Generatorを使えるAIモデルはどれですか?

TypingMindに接続したどのモデルでも利用できます。AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、GPT、Claude、Gemini、Grok、ローカルモデルのいずれも、リクエストの内容がこのスキルの用途に合ったときに、このスキルを読み込めます。

Bc Dataverse Mapping Generatorで使えるAIモデルの数に制限はありますか?

数に制限はありません。スキルに対応したモデルであれば、GPT、Claude、Gemini、Grok、DeepSeek、Mistral、Llamaなど、どのモデルでもBc Dataverse Mapping Generatorを利用できます。すべてTypingMind上で、自分のAPIキーを使って利用できます。

AIスキル「Bc Dataverse Mapping Generator」は無料ですか?

はい。fernandoartalfがMITライセンスのもとでGitHubに公開しています。ご利用のAIプロバイダーに支払うのは、使用したトークンの料金だけです。

AIスキルとは何ですか?

AIスキルは、特定のタスクの実行方法をAIモデルに教える、再利用可能な指示のセットです。オープンなAgent Skills形式に従い、名前と説明を含むSKILL.mdファイルに加え、モデルが必要とするスクリプト、テンプレート、参照ファイルで構成されます。モデルはリクエストがスキルに合致したときだけ指示を読み込むため、インストール済みのスキルも、使うまでは費用がかかりません。

AIスキルは、プラグインやMCPサーバーとどう違いますか?

プラグインやMCPサーバーは、モデルが呼び出せる新しいツールを提供します。ツールとは、どこかで実行され、結果を返すコードです。一方、AIスキルは、タスクへの取り組み方、従うべき手順、望ましい出力の例といった知識や進め方をモデルに伝えます。スキルは通常のMarkdownで記述されているため、サーバー、APIキー、実行環境は不要で、どのモデルでも利用できます。

すべて見る

今すぐ自分専用のAIワークスペースを作成

ニュースレターに登録すると、新機能や今後のプレゼント企画のお知らせが届きます👇