bc-setup-wizard-generator
Skill28 starsChanged 7 months agoMITView on GitHub
Generates assisted setup wizard pages for Business Central setup tables following Guided Experience patterns. Creates NavigatePage with step-based navigation using visibility controls, banner images (WIP/Finished from Media Repository), temporary source table, footer actions (Back/Next/Finish with InFooterBar), OnOpenPage trigger (InitRecord, EnableControls, LoadSetupBanner), OnQueryClosePage trigger with unsaved changes confirmation, navigation procedures (NextStep with Step Option variable, EnableControls with Case statement, SetControlsStepXX boolean updates), commit procedure using TransferFields pattern, and registration codeunit with OnRegisterAssistedSetup event subscriber for Guided Experience. Integrates with Assisted Setup page and Extension Management. Supports multi-step workflows with welcome step, configuration step(s), and review/finish step. Uses InstructionalText for user guidance. Completes setup via GuidedExperience.CompleteAssistedSetup. Use when creating setup wizards, implementing assisted setup for extensions, adding guided configuration to modules, creating multi-step setup pages, registering with Guided Experience framework, or building NavigatePage wizards with step navigation.
In this repository38 other files it gives its agents.
- bc-agent-instructions-debuggerSkill
- bc-al-bug-fixSkill
- bc-al-code-reviewerSkill
- bc-al-project-contextSkill
- bc-api-page-generatorSkill
- bc-api-query-generatorSkill
- bc-approval-workflow-generatorSkill
- bc-attachments-generatorSkill
- skill-batch-processingSkill
- bc-business-events-generatorSkill
- bc-cds-page-generatorSkill
- bc-dataverse-entity-generatorSkill
- bc-dataverse-mapping-generatorSkill
- bc-field-propagationSkill
- bc-install-codeunit-generatorSkill
- bc-isolated-storage-generatorSkill
- bc-job-queueSkill
- bc-manifest-handoff-generatorSkill
- bc-matrix-page-generatorSkill
- bc-number-series-generatorSkill
- bc-pricing-refactorSkill
- bc-report-selection-generatorSkill
- bc-reportsSkill
- bc-setup-table-generatorSkill
- bc-table-dimensions-generatorSkill
- bc-telemetry-generatorSkill
- bc-test-codeunit-generatorSkill
- bc-upgrade-codeunit-generatorSkill
- documentation-bc-analysis-generatorSkill
- documentation-bc-architecture-generatorSkill
- documentation-bc-ccn-generatorSkill
- documentation-bc-md-to-docx-converterSkill
- documentation-bc-phase-plan-generatorSkill
- documentation-bc-release-note-generatorSkill
- documentation-bc-technical-spec-generatorSkill
- documentation-bc-user-story-generatorSkill
- onprem-remote-deploySkill
- skill-contribution-assistantSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
19 rules. About 0 are common, 8 are distinctive, and 11 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈8
Distinctive · estimate
This author's own choices. Worth a look.
11
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 60
Add two banner groups at top of layout:
- Distinctive: line 72
Create one group per step with:
- Distinctive: line 77
Critical: Use step counters in captions for user guidance:
- Very specific: line 84
Add three actions in area(Processing):
- Very specific: line 89
All have InFooterBar = true for bottom positioning.
- Very specific: line 97
Call EnableControls() to show first step
- Very specific: line 98
Call LoadSetupBanner() to load banner images
- Very specific: line 101
If FinishedProcess = true: Commit changes, mark setup complete
- Distinctive: line 123
Check if setup record exists
- Distinctive: line 124
Create temporary record from existing or initialize new
- Distinctive: line 157
Create codeunit with event subscriber:
- Very specific: line 189
Fix: Check OnRegisterAssistedSetup event subscriber syntax, verify codeunit compiles without errors
- Very specific: line 193
Fix: Check exact image names (AssistedSetup-NoText-400px.png, AssistedSetupDone-NoText-400px.png), verify Media Repository exists in base BC
- Very specific: line 197
Fix: Ensure if FinishedProcess then condition exists, verify FinishAction sets flag before CurrPage.Close()
- Distinctive: line 201
Fix: Verify Step option has value for each step (Step10, Step20, Step30, etc.), check Case statement includes all values
- Very specific: line 205
Fix: Check if not SetupRecord.Get() then Insert else Modify pattern in CommitRecord procedure
- Distinctive: line 209
Fix: Ensure OnQueryClosePage calls CommitRecord() before GuidedExperience.CompleteAssistedSetup()
- Very specific: line 213
Fix: Add Editable = false to all field groups in final review step
- Very specific: line 217
Snippet: Use Waldo's tpagewizard3stepswaldo snippet for rapid scaffolding
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
BC Setup Wizard Generator
Automates creation of assisted setup wizards for Business Central setup tables following Guided Experience patterns.
Overview
Generates complete NavigatePage setup wizards with step-based navigation, banner images, temporary records, and Guided Experience registration. Follows Microsoft patterns for assisted setup.
Complete code templates available in: references/code-templates.md
Prerequisites
- AL workspace with setup table
- Setup table with fields to configure
- (Optional) Setup page for post-wizard access
Workflow
Step 1: Gather Information
Collect from user:
- Setup entity name (e.g., "Statistical Account")
- Setup table name and ID
- Prefix (e.g., "BCS")
- Number of configuration steps (typically 2-4)
- Field groups per step
- Documentation URLs (video + written)
Step 2: Plan Wizard Steps
Define wizard structure:
- Step 1: Welcome - InstructionalText explaining wizard purpose
- Step 2-N: Configuration - Field groups by logical category
- Final Step: Review & Finish - Read-only summary of all settings
Example 3-step wizard:
- Welcome
- Attachments Settings (Step 1/2)
- Number Series Setup (Step 2/2)
- Review & Finish
Step 3: Create Wizard Page
Create NavigatePage with:
PageType = NavigatePageSourceTable = [Setup Table]SourceTableTemporary = true← Critical for unsaved workflow
Location: src/Page/[Prefix][Entity]SetupWizard.Page.al
See code-templates.md for complete structure.
Step 4: Add Banner Groups
Add two banner groups at top of layout:
- SetupWIPBanner: Visible during configuration steps
- SetupFinishedBanner: Visible on review/finish step
Uses Media Repository records:
AssistedSetup-NoText-400px.png(WIP)AssistedSetupDone-NoText-400px.png(Finished)
See code-templates.md for complete code.
Step 5: Add Step Groups
Create one group per step with:
Visibleproperty bound toStepXVisibleboolean- InstructionalText for welcome/review steps
- Field groups for configuration
Critical: Use step counters in captions for user guidance:
Caption = 'Attachments Settings 📎(Step 1/3)'
See code-templates.md for complete patterns.
Step 6: Add Navigation Actions
Add three actions in area(Processing):
- ActionBack:
Enabled = BackActionEnabled, callsNextStep(true) - ActionNext:
Enabled = NextActionEnabled, callsNextStep(false) - ActionFinish:
Enabled = FinishActionEnabled, callsFinishAction()
All have InFooterBar = true for bottom positioning.
See code-templates.md for complete code.
Step 7: Add Page Triggers
OnOpenPage:
- Initialize temporary record from actual setup table
- Call
EnableControls()to show first step - Call
LoadSetupBanner()to load banner images
OnQueryClosePage:
- If
FinishedProcess = true: Commit changes, mark setup complete - Else: Confirm user wants to exit without saving
See code-templates.md for complete implementation.
Step 8: Add Navigation Procedures
Create local procedures:
ResetControls(): Reset all visibility booleans and action states
NextStep(Backwards: Boolean): Increment/decrement Step option, call EnableControls()
EnableControls(): Case statement routing Step to SetControlsStepXX()
SetControlsStepXX(): Set visibility for specific step, enable/disable actions
See code-templates.md for complete code.
Step 9: Add Data Management Procedures
InitRecord():
- Check if setup record exists
- Create temporary record from existing or initialize new
CommitRecord():
- Transfer temporary record to actual setup table
- Insert if new, Modify if exists
FinishAction():
- Set
FinishedProcess = true - Close page (triggers OnQueryClosePage commit)
See code-templates.md for complete code.
Step 10: Add Setup Banner Loading
LoadSetupBanner():
- Get Media Repository records by name
- Get Media Resources by reference
- Set
BannersVisibleif media has value
See code-templates.md for complete code.
Step 11: Declare Variables
Declare variables:
- Record variables: Setup table, Media Repository (2), Media Resources (2)
- Codeunit:
GuidedExperience - Boolean: StepXVisible (per step), BackActionEnabled, NextActionEnabled, FinishActionEnabled, FinishedProcess, BannersVisible
- Option:
Stepwith values matching step groups
See code-templates.md for complete list.
Step 12: Create Registration Codeunit
Create codeunit with event subscriber:
- Subscribe to
Codeunit::"Guided Experience"::OnRegisterAssistedSetup - Call
AssistedSetup.InsertAssistedSetup()with:- Title and description labels
- Time estimate (minutes)
- Wizard page ID
- Assisted Setup Group
- Video URL and category
- Documentation URL
Location: src/Codeunit/[Prefix][Entity]SetupManagement.Codeunit.al
See code-templates.md for complete code.
Step 13: Build and Test
- Build project:
al_build - Publish:
al_publish - Test from:
- Assisted Setup page (search "Assisted Setup")
- Extension Management (Setup actions)
- Verify:
- Navigation works (Back/Next/Finish)
- Banners display correctly
- Exit confirmation on close without finish
- Changes saved on finish
- Completion check marked
Troubleshooting
Wizard doesn't appear in Assisted Setup
Cause: Event subscriber not firing or registration failed
Fix: Check OnRegisterAssistedSetup event subscriber syntax, verify codeunit compiles without errors
Banners don't display
Cause: Media Repository records not found or media reference empty
Fix: Check exact image names (AssistedSetup-NoText-400px.png, AssistedSetupDone-NoText-400px.png), verify Media Repository exists in base BC
Changes saved even when clicking X to close
Cause: OnQueryClosePage not checking FinishedProcess flag
Fix: Ensure if FinishedProcess then condition exists, verify FinishAction sets flag before CurrPage.Close()
Steps don't navigate forward/backward
Cause: Step option enum values don't match group names, or EnableControls case statement incomplete
Fix: Verify Step option has value for each step (Step10, Step20, Step30, etc.), check Case statement includes all values
Error on finish: "Record already exists"
Cause: CommitRecord trying to Insert when record exists
Fix: Check if not SetupRecord.Get() then Insert else Modify pattern in CommitRecord procedure
Setup marked complete but changes not saved
Cause: CommitRecord not called before CompleteAssistedSetup
Fix: Ensure OnQueryClosePage calls CommitRecord() before GuidedExperience.CompleteAssistedSetup()
Review step shows editable fields
Cause: Review step groups missing Editable = false property
Fix: Add Editable = false to all field groups in final review step
Quick Reference
Snippet: Use Waldo's tpagewizard3stepswaldo snippet for rapid scaffolding
Core Pattern: Temporary record → User edits → Finish commits → Mark complete
Key Properties:
- Page:
PageType = NavigatePage,SourceTableTemporary = true - Actions:
InFooterBar = true - Groups:
Visible = StepXVisible
Required Codeunits: Guided Experience (InsertAssistedSetup, CompleteAssistedSetup)
Media Files: AssistedSetup-NoText-400px.png, AssistedSetupDone-NoText-400px.png
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

