Bc Al Bug Fix logo

Bc Al Bug Fix

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

Overview

Publisherfernandoartalf
RepositoryAL-Copilot-Skills-Collection
Skill namebc-al-bug-fix
Stars
28
Forks
8
Bundled files
4
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 4 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by fernandoartalf on GitHub. Read the source before you install it.

Installation

Install the Bc Al Bug Fix AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/fernandoartalf/AL-Copilot-Skills-Collection/tree/main/skills/bc-al-bug-fix
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

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
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Bc Al Bug Fix in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Bc Al Bug Fix on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Bc Al Bug Fix is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

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

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Bc Al Bug Fix AI skill do?

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

Why use Bc Al Bug Fix on TypingMind?

Because you install it once and use it with any model. Bc Al Bug Fix is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Bc Al Bug Fix in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/fernandoartalf/AL-Copilot-Skills-Collection/tree/main/skills/bc-al-bug-fix. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Bc Al Bug Fix?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Bc Al Bug Fix?

As many as you like. As long as a model supports skills, you can use Bc Al Bug Fix with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Bc Al Bug Fix AI skill free?

Yes. It is published on GitHub by fernandoartalf under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇