bc-cds-page-generator
Skill28 starsChanged 7 months agoMITView on GitHub
Automatically generate AL list page objects for CDS (Dataverse) tables with standard CRM integration patterns. Creates list pages with proper field layouts, CRM integration actions, coupling procedures, and initialization triggers. Use when user requests to create, generate, or build a list page for a CDS/Dataverse table, or mentions creating UI for Dataverse entities. Trigger phrases include "create page for CDS table", "generate list page for [entity]", "build Dataverse page", or when working with CDS integration tables that need user interfaces.
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-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-setup-wizard-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
We split this skill into the rules it gives an agent
3 rules. About 0 are common, 2 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 58
Create the page file with:
- Very specific: line 151
Use base CRM table as SourceTable (e.g., "CRM Product")
- Distinctive: line 152
Follow same field visibility rules
≈ “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
Business Central CDS Page Generator
Generates AL list page objects for CDS (Dataverse) tables with standard CRM integration patterns. Creates read-only list pages with coupling support, CreateFromCDS actions, and proper field visibility.
Prerequisites
- CDS table exists (TableType = CDS) in
src/Table/ - Available page ID (use Object ID Ninja or manual allocation)
- Understanding of which fields should be visible by default
- Author prefix defined (e.g., "BCS", "ABC", "XYZ") for consistent object naming
Quick Reference
Naming conventions:
- Page name:
"[PREFIX] CDS [EntityName]"(plural) — replace[PREFIX]with author prefix (e.g., "BCS CDS Countries") - Page caption:
'Dataverse [EntityName]' - File name:
[PREFIX]CDS[EntityName].Page.al— replace[PREFIX](e.g., "BCSCDSCountries.Page.al") - Entity variable:
CDS[Entity](e.g.,CDSCountry,CDSDepartment)
Note: The author's prefix in examples is "BCS". Replace with your own prefix throughout.
Standard properties:
PageType = ListEditable = false(CDS tables are read-only from BC)RefreshOnActivate = true(refresh from Dataverse on page activation)UsageCategory = Lists(makes page searchable)
Workflow
Step 1: Identify CDS Table and Prefix
Gather information:
- Author Prefix — your organization's prefix (e.g., "BCS", "ABC", "XYZ")
- CDS Table Name (e.g., "[PREFIX] CDS bcs_country")
- Entity Display Name (e.g., "Countries", "Departments")
- Primary Fields — which fields are most important (code, name, key identifiers)
- System Fields — standard fields that should be hidden (CreatedOn, ModifiedOn, statecode, statuscode, SystemId)
Step 2: Determine Page ID
Find next available page ID:
Get-ChildItem "src/Page/*.al" |
ForEach-Object {
$content = Get-Content $_.FullName -Raw
if ($content -match 'page\s+(\d+)') { [int]$matches[1] }
} | Sort-Object | Select-Object -Last 1Next ID = Last ID + 1
Step 3: Generate Page Structure
Create the page file with:
- File path:
src/Page/[PREFIX]CDS[EntityName].Page.al(e.g.,BCSCDSCountries.Page.al) - Page properties — use standard CDS list page properties
- Layout — organize fields by visibility priority (see
references/field-layout.md) - Actions — include CreateFromCDS action
- Triggers — add OnInit trigger
- Procedures — add SetCurrentlyCoupled[Entity] procedure
For complete code patterns and templates, read:
references/quick-start.md— quick start guide with workflows and troubleshootingreferences/field-layout.md— field organization and visibility patternsreferences/standard-components.md— actions, triggers, and proceduresreferences/examples.md— complete working examples
Step 4: Organize Fields
Field visibility rules:
- Visible (3-5 fields): Primary identifiers, names, key business fields
- Hidden (Visible = false): Technical fields, system fields, supplementary data
Standard field order:
- Primary identification fields
- Important business fields
- Additional business fields (hidden)
- System fields (all hidden): CreatedOn, ModifiedOn, statecode, statuscode, SystemId
Step 5: Add Standard Components
Required components:
CreateFromCDSaction — creates BC records from selected Dataverse recordsOnInittrigger — initializes CRM Integration ManagementSetCurrentlyCoupled[Entity]procedure — tracks coupled record in lookup scenarios
See references/standard-components.md for complete implementations.
Step 6: Validate
- Page name follows
"[PREFIX] CDS [EntityName]"pattern with your author prefix - File name follows
[PREFIX]CDS[EntityName].Page.alpattern - Caption is
'Dataverse [EntityName]' - SourceTable references correct CDS table
- All field names match table definition (case-sensitive)
- ToolTips are meaningful
- CreateFromCDS action variable matches entity name
- SetCurrentlyCoupled procedure parameter matches entity name
- Page compiles without errors
Field Layout Principles
Primary fields (visible):
- Code/Number fields
- Name/Description fields
- Key classification fields
Hidden fields:
- GUIDs (except for debugging)
- Audit timestamps (CreatedOn, ModifiedOn)
- Status codes (statecode, statuscode)
- SystemId
ToolTip format:
- Start with "Specifies"
- Be specific about what the field represents
- End with period
Example: 'Specifies the two-letter ISO country code.'
Integration with Other Skills
| Skill | Relationship |
| bc-dataverse-entity-generator | Generate CDS table first, then create page |
| bc-dataverse-mapping-generator | Page used in lookup procedures for coupling |
| bc-tooltip-manager | Enhance tooltips after page generation |
| dataverse-schema-generator | Reference schema docs for field selection |
Common Patterns
Master Data Pattern
For reference entities (Country, Currency, Legal Entity):
- Show code + name
- Show key attributes (ISO codes, classifications)
- Hide most other fields
Transactional Pattern
For transaction entities (Order, Invoice):
- Show document number + date
- Show party fields (customer, vendor)
- Show amount/status
- Hide line-level details
Standard CRM Entity Pattern
For OOB entities (Account, Contact, Product):
- Use base CRM table as SourceTable (e.g.,
"CRM Product") - Follow same field visibility rules
- Adapt entity variable names
See EXAMPLES.md for complete implementations of each pattern.
Troubleshooting
| Issue | Solution |
| Fields not found | Verify field names match table exactly (case-sensitive) |
| Page doesn't display data | Check RefreshOnActivate = true and OnInit trigger present |
| CreateFromCDS action fails | Verify CRM Integration Management available and CDS connection configured |
| Compilation errors | Update variable names to match entity (CDSCountry, CDSDepartment) |
Output Confirmation
CDS list page generated successfully!
Page: [ID] "BCS CDS [EntityName]"
File: src/Page/BCSCDS[EntityName].Page.al
Caption: Dataverse [EntityName]
Source: "BCS CDS [tablename]"
Visible fields: [count]
Hidden fields: [count]
Components included:
✓ CreateFromCDS action
✓ OnInit trigger
✓ SetCurrentlyCoupled[Entity] procedure
Next steps:
- Build project (Ctrl+Shift+P → AL: Build)
- Test page opens from Tell Me search
- Verify data displays from Dataverse connectionDoes 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.

