Logo: Bc Al Bug Fix

Bc Al Bug Fix

Communautéit
fernandoartalf
bc-al-bug-fix

Diagnoses and fixes bugs in Business Central AL extensions following a structured investigation workflow. Covers the full fix cycle: symptom triage, root cause identification, minimal targeted fix, and regression test. Maps BC-specific symptoms to their most likely root causes before touching code — including FlowField miscalculation, SetLoadFields data truncation, event subscriber ordering, trigger execution gaps, permission errors, and posting validation failures. Generates a diagnosis document before any code change. Use this skill whenever you need to debug AL code, fix a BC extension bug, investigate unexpected behaviour, resolve a runtime error, troubleshoot a posting failure, investigate a wrong value on a page, or fix a broken event subscriber. Also use when the user says 'this is not working', 'wrong value', 'record not found', 'not triggered', 'permission error', or any AL/BC runtime complaint.

Iwwersiicht

Editeurfernandoartalf
RepositoryAL-Copilot-Skills-Collection
Skill-Nummbc-al-bug-fix
Stären
28
Forks
8
Matgeliwwert Dateien
4
LizenzMIT
Linken
  • Instruktiounen am Markdown-Format

    Eng SKILL.md-Datei, déi de Modell bei Bedarf luet, soudatt nëmmen Token ufalen, wann eng Ufro tatsächlech dozou passt.

  • Funktionéiert mat all LLM

    KI-Skills si reng Markdown, keen ubidderspezifesche Code. Dofir funktionéiert dëse Skill mat GPT, Claude, Gemini, Grok oder engem lokale Modell.

  • 4 matgeliwwert Dateien

    Skripten, Virlagen a Referenzen, déi de Modell beim Schaffe liese kann. D'Dateie kënnen nëmme gelies ginn a ginn ni ausgeféiert.

  • Open Source

    fernandoartalf huet de Skill op GitHub verëffentlecht. Liest de Quelltext, ier Dir de Skill installéiert.

Installatioun

Installéiert de KI-Skill Bc Al Bug Fix an TypingMind, fir e mat all LLM ze benotzen, oder setzt en an en anere KI-Agent an, deen SKILL.md liest.

1

An TypingMind installéieren

TypingMind installéiert e Skill direkt aus sengem GitHub-Dossier — dobäi gëtt SKILL.md gelies, d'Ressourcedateie gi gebëndelt an d'Resultat gëtt lokal gespäichert.

  1. Maacht d'App op a gitt op Plugins → Skills.
  2. Wielt „Vu GitHub installéieren“.
  3. Pecht d'URL vum Skill-Dossier, déi hei drënner steet, an a bestätegt d'Installatioun.
    https://github.com/fernandoartalf/AL-Copilot-Skills-Collection/tree/main/skills/bc-al-bug-fix
  4. Aktivéiert de Skill an all Chat, an deem Dir e benotze wëllt.
Plugins → Skills → Skill derbäisetzen → Iwwer eng GitHub-URL. Pecht dann d'URL vum Dossier an a klickt op Weider.
2

An engem anere KI-Agent installéieren

All KI-Agent, deen d'Format Agent Skills liest, kann dëse Skill benotzen — kopéiert den Dossier an d'Skill-Verzeechnes vun deem KI-Agent.

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-al-bug-fix .claude/skills/bc-al-bug-fix
Start Claude Code nom Kopéieren nei, fir datt den neie Skill erkannt gëtt.

An TypingMind benotzen

Aktivéiert Bc Al Bug Fix an engem Chat vun TypingMind, an de Modell iwwerhëlt de Rescht. Den Numm an d'Beschreiwung stinn am System-Prompt. Soubal eng Ufro dozou passt, luet de Modell déi komplett Instruktioune selwer — Dir musst de Skill ni manuell opruffen, an et fale keng Token un, bis en tatsächlech benotzt gëtt.

De Modell luet Bc Al Bug Fix automatesch, soubal eng Ufro dozou passt.

Funktionéiert mat all KI-Modell

KI-Skills si reng Markdown-Instruktiounen amplaz vun ubidderspezifeschem Code. Dofir ass Bc Al Bug Fix net un de Modell gebonnen, fir deen de Skill geschriwwe gouf. Installéiert en eemol an TypingMind a benotzt e mat GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama oder engem lokale Modell, deen Dir selwer bedreift — alles mat Ären eegenen API-Schlësselen.

  • Gëtt nëmme gelueden, wann et néideg ass

    De System-Prompt enthält nëmmen den Numm an d'Beschreiwung. D'Instruktioune gi bei der éischter passender Ufro gelueden, soudatt en onbenotzte Skill näischt kascht.

  • De Modell am lafende Chat wiesselen

    Well de Skill aus Instruktiounen amplaz vu Code besteet, funktionéiert en och no engem Modellwiessel — den nächste Modell liest déi selwecht SKILL.md-Datei.

Skill-Instruktiounen

Dëst ass den Inhalt vu SKILL.md, deen de Modell luet. Liest e virun der Installatioun — e Skill besteet aus Instruktiounen, déi Äre Modell befollegt.

BC AL Bug Fix

Structured diagnosis and fix workflow for Business Central AL extension bugs. The core principle: understand before touching. Every fix starts with a diagnosis document, not with code changes.

Read references/symptom-map.md during Step 1 triage to map the symptom to its most likely root causes before touching any code. Read references/fix-patterns.md after confirming the root cause to apply the correct fix pattern and use the diagnosis template.


What makes BC bugs different

BC AL bugs rarely have an obvious stack trace. The same surface symptom — "wrong value on the page", "record not found", "action does nothing" — can come from a dozen different root causes spread across tables, page extensions, event subscribers, permissions, and configuration. Jumping to a code fix without diagnosis almost always fixes the wrong thing.

This skill imposes a discipline: map the symptom to the layer first, then look at code.


Input

The user provides one or more of:

  • Symptom description — what the user sees, on which page, after which action
  • Error message — exact text if any error is shown
  • AL code — the relevant codeunit, table, page, or extension
  • Object type — is this a table extension, a page extension, an event subscriber, a report?
  • BC version / environment — SaaS, On-Prem, version number (affects available APIs)

If the user provides code without a symptom, ask for the symptom first. Root cause analysis without observable behaviour is guesswork.


Execution workflow

Step 1 — Triage: layer and category

Before reading a single line of code, classify the bug:

Layer (where does it live?):

LayerExamples
DataWrong field value, missing record, duplicated entry
LogicCalculation wrong, condition not met, loop skips records
UIField not visible, action disabled, page not refreshing
IntegrationEvent subscriber not firing, posting fails at wrong point
SecurityPermission error, data scope wrong, company filter leaking
ConfigurationSetup missing, number series not configured, posting group absent

Category (what kind of bug?): see references/symptom-map.md for the full catalogue with root cause probabilities per symptom.

State the layer and category explicitly before proceeding.


Step 2 — Hypothesis: most likely root causes

Based on the symptom and layer, list the top 2–3 most likely root causes in priority order. Do not list more than 3 — if you cannot narrow it down, ask a clarifying question.

Example format:

Symptom: Balance field shows 0 on Customer Card after posting.
Layer: Data / UI
Most likely causes:
  1. CalcFields not called — FlowField not refreshed after posting (HIGH probability)
  2. SetLoadFields excludes Balance (LCY) — field present but not loaded (MEDIUM)
  3. Wrong key used in CalcFormula filter — field calculated against wrong records (LOW)

Step 3 — Diagnosis document

Always create this before writing any fix. File: {object-name}-diagnosis.md

Use the exact template in references/fix-patterns.md#diagnosis-template.

The diagnosis document must include:

  • Symptom (as reported)
  • Layer and category
  • Hypotheses ranked by probability
  • Evidence gathered (code snippets, trigger order, field values)
  • Confirmed root cause
  • Proposed fix (description, not code yet)
  • Regression risk — what else could break

PAUSE here. Present the diagnosis to the user and confirm before writing any code.


Step 4 — Fix

Apply the minimal fix that addresses the confirmed root cause. Do not refactor, do not clean up unrelated code, do not add features. One fix, one commit.

Follow the fix pattern for the confirmed root cause category from references/fix-patterns.md.

Rules:

  • Modify(false) for bulk data fixes — never fire triggers on migration fixes
  • SetLoadFields before any FindSet if not already present
  • Preserve existing event subscriber signatures exactly — changing a parameter type breaks all subscribers silently
  • Never remove IsHandled from an OnBefore event — other subscribers may depend on it

Step 5 — Regression test

For every fix, define at minimum:

  • Happy path test: the scenario that was broken now works
  • Adjacent test: the nearest scenario that should NOT have changed, confirm it still works
  • Edge case: the boundary condition most likely to be affected by the fix

Write the test as a Given/When/Then description. If the project has a test codeunit, implement it. If not, document it for manual verification.


Step 6 — Skills Evidencing

End every fix session with:

## Skills Evidencing
| Field | Value |
|---|---|
| Skill loaded | bc-al-bug-fix |
| Symptom | {symptom} |
| Layer | {layer} |
| Root cause | {root cause category} |
| Fix applied | {one-line description} |
| Diagnosis doc | {filename} |
| Tests defined | {count} |

Behaviour rules

  1. Never propose a fix without a diagnosis document. If the user pushes for a quick fix, explain the risk and offer to write the diagnosis in 2 minutes.

  2. If the symptom is ambiguous (multiple equally likely root causes), ask one clarifying question before proceeding — not multiple questions at once.

  3. If the bug is in a base BC object, the fix goes in a table/page/codeunit extension or an event subscriber — never in a base object.

  4. If the root cause is configuration (missing setup, number series, posting group), say so and do not propose a code fix. Configuration bugs are not code bugs.

  5. If you cannot reproduce the root cause from the provided information, say so. Do not fabricate evidence.

  6. If the fix requires a data migration (existing records have wrong values), flag it explicitly and treat it as a separate step with its own diagnosis.


Reference files

  • references/symptom-map.md — BC symptom → root cause catalogue with probability weights
  • references/fix-patterns.md — Fix patterns per root cause category + diagnosis template

Matgeliwwert Dateien

De Modell liest dës Dateie bei Bedarf, wärend de Skill gelueden ass. Si ginn als liesbar Dateie bereetgestallt a ginn ni ausgeféiert.

Heefeg gestallte Froen

Wat mécht de KI-Skill Bc Al Bug Fix?

Diagnoses and fixes bugs in Business Central AL extensions following a structured investigation workflow. Covers the full fix cycle: symptom triage, root cause identification, minimal targeted fix, and regression test. Maps BC-specific symptoms to their most likely root causes before touching code — including FlowField miscalculation, SetLoadFields data truncation, event subscriber ordering, trigger execution gaps, permission errors, and posting validation failures. Generates a diagnosis document before any code change. Use this skill whenever you need to debug AL code, fix a BC extension b...

Firwat Bc Al Bug Fix op TypingMind benotzen?

Well Dir en eemol installéiert a mat all Modell benotze kënnt. Bc Al Bug Fix besteet aus einfachem Markdown amplaz vun ubidderspezifeschem Code. Dee selwechte Skill funktionéiert also mat GPT-5, Claude, Gemini, Grok oder engem lokale Modell – an Dir kënnt de Modell matzen am Chat wiesselen, ouni datt de Skill ophält ze funktionéieren. TypingMind benotzt Är eegen API-Schlësselen, sou datt Dir d'Ubidder direkt bezuelt, amplaz en Abonnement pro Benotzerplaz ze bezuelen. Är Skills a Chats bleiwen an Ärem eegene Späicher.

Wéi installéieren ech Bc Al Bug Fix an TypingMind?

Maacht an TypingMind Plugins → Skills → Vu GitHub installéieren op a setzt https://github.com/fernandoartalf/AL-Copilot-Skills-Collection/tree/main/skills/bc-al-bug-fix an. TypingMind liest d'Datei SKILL.md, bëndelt déi zougehéiereg Dateien an installéiert dat Ganzt als Skill, deen Dir pro Chat aktivéiere kënnt.

Wéi eng KI-Modeller kënnen Bc Al Bug Fix benotzen?

All Modell, deen Dir an TypingMind verbënnt. KI-Skills sinn einfach Markdown-Instruktiounen an net ubidderspezifesche Code. Dofir kënne GPT, Claude, Gemini, Grok a lokal Modeller dëse Skill lueden, wann eng Ufro dozou passt.

Wéi vill KI-Modeller kann ech mat Bc Al Bug Fix benotzen?

Esou vill wéi Dir wëllt. Soulaang e Modell Skills ënnerstëtzt, kënnt Dir Bc Al Bug Fix domat benotzen – zum Beispill mat GPT, Claude, Gemini, Grok, DeepSeek, Mistral oder Llama – alles op TypingMind mat Ären eegenen API-Schlësselen.

Ass de KI-Skill Bc Al Bug Fix gratis?

Jo. fernandoartalf huet de Skill ënner der Lizenz MIT op GitHub publizéiert. Dir bezuelt nëmmen Ären eegene KI-Ubidder fir d'Token, déi Dir benotzt.

Wat si KI-Skills?

E KI-Skill ass e weiderverwendbare Pak vun Instruktiounen, deen engem KI-Modell bäibréngt, wéi en eng bestëmmt Aufgab erfëllt. E follegt dem oppenen Agent Skills-Format: eng Datei SKILL.md mat engem Numm an enger Beschreiwung, plus all Scripten, Virlagen oder Referenzdateien, déi de Modell eventuell brauch. De Modell liest d'Instruktiounen eréischt, wann Är Ufro zum Skill passt. En installéierte Skill kascht also näischt, bis e benotzt gëtt.

Wéi ënnerscheede sech KI-Skills vu Plugins oder MCP-Serveren?

E Plugin oder MCP-Server gëtt engem Modell nei Tools, déi en opruffe kann – Code, deen iergendwou leeft an e Resultat zeréckgëtt. E KI-Skill gëtt dem Modell dogéint Wëssen an eng Virgoensweis: wéi en eng Aufgab ugeet, wéi eng Schrëtt e maache soll a wéi eng gutt Ausgab ausgesäit. Skills bestinn aus einfachem Markdown, brauche kee Server, keen API-Schlëssel a kee Lafzäitëmfeld a funktionéiere mat all Modell.

Alleguer weisen

Elo Ären eegene KI-Aarbechtsberäich ariichten

Abonnéiert Iech op eisen Newsletter, fir iwwer nei Funktiounen an zukünfteg Gewënnspiller informéiert ze ginn 👇