AL Object ID Suggester
🔢 The essential VS Code extension for Business Central AL developers!
Instantly find the next available Object ID for your Business Central AL development. No more manual counting or ID conflicts - this extension scans your workspace and suggests the perfect sequential ID for Pages, Tables, Codeunits, Reports, and more.
⨠Features
🚀 One-Click File Creation
- Create AL Files Instantly: Generate complete AL object files with proper structure
- Smart Templates: Pre-built templates for all AL object types
- Auto-naming: Suggests filenames following AL conventions
- Ready-to-code: Files include proper structure, fields, and procedures
🔍 Enhanced v1.1.0 Features
- 🔗 AL Language Integration: Enhanced compatibility with Microsoft AL Language extension
- 📊 Export ID Usage Reports: Generate comprehensive CSV/JSON reports with validation issues
- â
Bulk ID Validation: Workspace-wide validation for duplicates, gaps, and compliance
- 🎯 Advanced Filename Templates: Fully customizable templates with smart placeholders
- 🔄 Object Dependency Tracking: Analyze dependencies and references across your workspace
- 🚨 Enhanced Validation Engine: Comprehensive rules with configurable severity levels
- 📈 Gap Detection: Identify and suggest available IDs in number sequences
- â ī¸ Duplicate Detection: Find and report duplicate object IDs across workspace
- 📝 Metadata Collection: File sizes, modification dates, and detailed object information
- âŗ Modern Progress Indicators: Enhanced UX with progress tracking for long operations
🎯 Smart Content-Based Parsing
- Reads Actual Files: Parses AL file content to extract real object IDs
- More Reliable: Works regardless of filename conventions
- Range-Aware: Only counts objects within your project's ID range
- Outside Range Detection: Shows objects outside your range (ignored in suggestions)
🎯 Smart app.json Integration
- Project-Aware: Automatically reads
app.json for ID range constraints
- Range Validation: Respects Business Central project ID ranges (
idRanges)
- Fallback Support: Uses extension settings when no
app.json exists
- Project Display: Shows project name and publisher information
- Real-time Updates: Reloads app.json when file changes
🎯 Smart ID Detection
- Scans your entire AL workspace automatically
- Recognizes all standard AL object types
- Finds the highest used ID per object type within your range
- Suggests the next sequential number
📋 Supported AL Object Types
- Pages (PAG) - User interface pages
- Tables (TAB) - Data storage tables
- Codeunits (COD) - Business logic containers
- Reports (REP) - Reports and documents
- XMLPorts (XMP) - XML data exchange
- Queries (QUE) - Data queries
- Enums (ENM) - Enumeration types
- Interfaces (INT) - Interface definitions
- ControlAddIns (CON) - Control add-ins
- Page Extensions (PAGEXT) - Page extensions
- Table Extensions (TABEXT) - Table extensions
⥠Multiple Access Methods
- Quick Object Selector:
Ctrl+Shift+Alt+I for instant access
- Specific Commands: Direct shortcuts for Pages, Tables, Codeunits, Reports
- Context Menus: Right-click on AL files for quick suggestions
- Command Palette: Full command access via
Ctrl+Shift+P
🎨 Developer-Friendly Interface
- Visual object type icons and descriptions
- Current ID range information
- Suggested filename generation
- Range validation warnings
- One-click ID and filename copying
🔧 Configurable SettingsÃ
- Custom ID ranges per object type
- Default starting IDs (typically 50000 for partner objects)
- Include/exclude extensions from scanning
- Auto-refresh when files change
- Filename suggestion formatting
â Like This Extension?
Support its development and keep it free for everyone:

🚀 Quick Start
Installation
From VS Code Marketplace:
ext install renni-dev.al-object-id-suggester
From VSIX file:
- Download the
.vsix file
- Open VS Code â Extensions â Install from VSIX
Basic Usage
Method 1: Create AL File Instantly (NEW! 🚀)
- Open Command Palette (
Ctrl+Shift+P)
- Type:
AL Object ID: Create AL Object File
- Select object type (Page, Table, Codeunit, etc.)
- Enter object name
- Done! - File created with proper structure and next available ID
Method 2: Quick ID Suggestion
- Press
Ctrl+Shift+Alt+I (Windows/Linux) or Cmd+Shift+Alt+I (Mac)
- Select your object type from the list
- Choose from actions:
- 📋 Copy ID
- 📄 Copy Filename
- 🚀 Create File
- 📊 Show All Ranges
Method 3: Specific Object Commands
- Pages:
AL Object ID: Next Available Page ID
- Tables:
AL Object ID: Next Available Table ID
- Codeunits:
AL Object ID: Next Available Codeunit ID
- Reports:
AL Object ID: Next Available Report ID
- Right-click any
.al file â "Suggest Next Available Object ID"
- Right-click folder â "Create AL Object File"
Method 6: Export ID Usage Report (NEW! 📊)
- Open Command Palette (
Ctrl+Shift+P)
- Type:
AL Object ID: Export ID Usage Report
- Choose format (CSV, JSON, or both)
- Report Generated! - Comprehensive analysis with validation issues
Method 7: Bulk Validate Object IDs (NEW! â
)
- Open Command Palette (
Ctrl+Shift+P)
- Type:
AL Object ID: Bulk Validate Object IDs
- View comprehensive validation results
- Fix Issues! - Get suggestions for duplicates, gaps, and compliance
Method 8: Track Object Dependencies (NEW! 🔄)
- Open Command Palette (
Ctrl+Shift+P)
- Type:
AL Object ID: Track Object Dependencies
- Explore object relationships and dependencies
- Analyze! - Understand your codebase structure
- Open Command Palette (
Ctrl+Shift+P)
- Type:
AL Object ID: Configure Filename Templates
- Customize templates with placeholders
- Personalize! - Use {PREFIX}, {ID}, {NAME}, {TYPE}, {DATE}, {TIME}
📖 Detailed Usage
Understanding the Results
When you request a suggestion, you'll see:
Next Page ID: 50124
Range: 50000-99999 | Current: 23 objects | Highest: 50123
Suggested filename: PAG50124.NewObject.al
What this means:
- Next ID: 50124 (the suggested ID to use)
- Range: Your configured ID range (50000-99999)
- In range: 23 objects found within your ID range
- Highest: 50123 (current highest ID in range)
- Outside range: Objects found outside range (ignored)
- Filename: Suggested complete filename
File Creation Templates
When creating files, the extension provides complete, ready-to-use templates:
Page Template:
page 50124 "My Custom Page"
{
PageType = Card;
ApplicationArea = All;
UsageCategory = Administration;
layout
{
area(Content)
{
group(GroupName)
{
Caption = 'General';
// Fields here
}
}
}
// Actions and variables included
}
Table Template:
table 50124 "My Custom Table"
{
DataClassification = ToBeClassified;
fields
{
field(1; "No."; Code[20]) { }
field(2; "Name"; Text[100]) { }
// More fields and triggers included
}
}
All templates include:
- â
Proper AL syntax and structure
- â
Essential fields and properties
- â
Triggers and procedures where appropriate
- â
Ready for immediate development
ID Range Validation
The extension validates suggestions against your configured ranges:
- â
Green: ID is within your configured range
- â ī¸ Warning: ID is outside configured range (still usable)
Copying Results
After getting a suggestion, you can:
- Copy ID: Copy just the number (e.g., "50124")
- Copy Filename: Copy the complete filename (e.g., "PAG50124.NewObject.al")
- Show All Ranges: View usage across all object types
- Refresh Scan: Update the workspace scan
âī¸ Configuration
Access settings via File > Preferences > Settings and search for "AL Object ID":
alObjectId.defaultStartId
Default: 50000
Starting ID for new objects (Microsoft partner range):
{
"alObjectId.defaultStartId": 50000
}
alObjectId.customRanges
Default: Partner ranges (50000-99999)
Customize ID ranges per object type:
{
"alObjectId.customRanges": {
"page": { "start": 50000, "end": 59999 },
"table": { "start": 60000, "end": 69999 },
"codeunit": { "start": 70000, "end": 79999 },
"report": { "start": 80000, "end": 89999 }
}
}
alObjectId.includeExtensions
Default: true
Include page and table extensions in ID scanning:
{
"alObjectId.includeExtensions": false
}
alObjectId.autoRefresh
Default: true
Automatically refresh when AL files change:
{
"alObjectId.autoRefresh": false
}
alObjectId.suggestFilename
Default: true
Generate suggested filenames with IDs:
{
"alObjectId.suggestFilename": false
}
alObjectId.showFullPath
Default: false
Show full file paths in object lists:
{
"alObjectId.showFullPath": true
}
New v1.1.0 Configuration Options
alObjectId.filenameTemplates
Default: Standard AL naming patterns
Custom filename templates for different object types:
{
"alObjectId.filenameTemplates": {
"page": "{PREFIX}{ID}.{NAME}.al",
"table": "{PREFIX}{ID}.{NAME}.al",
"codeunit": "src/{TYPE}/{PREFIX}{ID}.{NAME}.al"
}
}
Default: "csv"
Default export format for ID usage reports:
{
"alObjectId.exportFormat": "both"
}
alObjectId.dependencyTracking
Default: true
Enable object dependency tracking and analysis:
{
"alObjectId.dependencyTracking": false
}
alObjectId.validationRules
Default: Flexible validation
Configure bulk validation rules:
{
"alObjectId.validationRules": {
"requireSequentialIds": false,
"allowGaps": true,
"warnOnDuplicates": true,
"enforceNamingConvention": false
}
}
📊 Export Reports and Validation (NEW in v1.1.0)
ID Usage Reports
Generate comprehensive reports for analysis and documentation:
JSON Format includes:
{
"timestamp": "2025-06-08T10:30:00.000Z",
"projectInfo": {
"name": "My Business Central App",
"publisher": "My Company",
"totalObjects": 45,
"rangeSource": "app.json"
},
"objectRanges": [...],
"objects": [...],
"validationIssues": [...]
}
CSV Format includes:
- Object Type and ID
- Object Name and Filename
- Range compliance status
- Dependencies list
- File modification dates
- File sizes
Bulk Validation
Comprehensive workspace analysis:
- â Errors: Duplicate IDs, critical issues
- â ī¸ Warnings: Out-of-range objects, naming issues
- âšī¸ Info: Available gaps, optimization suggestions
Validation Rules:
- Duplicate ID detection across object types
- Range compliance checking
- Sequential ID validation (optional)
- Naming convention enforcement (optional)
- Gap analysis and suggestions
Dependency Tracking
Understand your codebase relationships:
Page 50001: Customer Management
âââ Table: Customer
âââ Codeunit: Customer Functions
âââ Report: Customer List
Tracks:
- Table references (Record, RecordRef, Database::)
- Page references (Page.)
- Codeunit references (Codeunit::)
- Report references (Report.)
Advanced Filename Templates
Customize filename generation with placeholders:
Available Placeholders:
{PREFIX}: Object prefix (PAG, TAB, COD, etc.)
{ID}: Object ID number
{NAME}: Object name
{TYPE}: Object type (Page, Table, etc.)
{DATE}: Current date (YYYY-MM-DD)
{TIME}: Current time (HHMMSS)
Examples:
{PREFIX}{ID}.{NAME}.al â PAG50001.CustomerList.al
{TYPE}_{ID}_{NAME}.al â Page_50001_CustomerList.al
{PREFIX}{ID}.{NAME}.{DATE}.al â PAG50001.CustomerList.2025-06-08.al
src/{TYPE}/{PREFIX}{ID}.{NAME}.al â src/Page/PAG50001.CustomerList.al
🎯 Use Cases
Development Workflow
- Need a new Page? â
Ctrl+Shift+Alt+I â Select "Page" â Get ID 50124
- Copy the suggested filename:
PAG50124.NewObject.al
- Create your file with the correct ID
- No conflicts, no counting, no hassle!
Team Development
- Consistent ID allocation across team members
- Avoid duplicate IDs in version control
- Quick verification of current ID usage
- Range management for different object types
Large Projects
- Instant overview of ID usage across hundreds of objects
- Efficient gap detection in numbering sequences
- Custom range enforcement for organized development
- Quick conflict resolution
📋 Business Central ID Ranges Reference
Microsoft Standard Ranges
- 1-9,999: Microsoft base objects
- 10,000-49,999: Microsoft add-on objects
- 50,000-99,999: Partner/ISV objects â (Your range)
- 100,000+: Customer-specific objects
Common Naming Conventions
PAG50001.CustomerList.al # Page
TAB50001.CustomerData.al # Table
COD50001.CustomerManagement.al # Codeunit
REP50001.CustomerReport.al # Report
XMP50001.CustomerImport.al # XMLPort
QUE50001.CustomerQuery.al # Query
ENM50001.CustomerStatus.al # Enum
PAGEXT50001.CustomerListExt.al # Page Extension
🛠ī¸ Development
Building from Source
Clone the repository:
git clone https://github.com/renni-dev/al-object-id-suggester
cd al-object-id-suggester
Install dependencies:
npm install
Compile:
npm run compile
Test:
- Press
F5 to launch Extension Development Host
- Test with a Business Central AL workspace
Project Structure
al-object-id-suggester/
âââ src/
â âââ extension.ts # Main extension logic
âââ images/
â âââ icon.svg # Extension icon
âââ .vscode/ # VS Code configuration
âââ package.json # Extension manifest
âââ tsconfig.json # TypeScript configuration
âââ README.md # This file
🐛 Troubleshooting
No AL Files Found
- Ensure you have
.al files in your workspace
- Check that files follow standard naming conventions
- Verify workspace folder is properly opened
Wrong ID Suggestions
- Use "Refresh Object Scan" command
- Check filename patterns match AL standards
- Verify custom ranges in settings
Extension Not Loading
- Ensure workspace contains
.al files
- Check VS Code's Extension Host output for errors
- Restart VS Code if needed
- Large workspaces may take longer to scan
- Consider disabling auto-refresh for very large projects
- Use "Refresh Object Scan" manually when needed
📄 License
MIT License - see LICENSE file for details.
🤝 Contributing
Contributions are welcome! Please feel free to submit issues and enhancement requests.
Planned Features
- app.json integration for project-specific ranges (â
COMPLETED in v1.1.0)
- Integration with AL Language extension (â
COMPLETED in v1.1.0)
- Export ID usage reports (â
COMPLETED in v1.1.0)
- Bulk ID validation (â
COMPLETED in v1.1.0)
- Advanced filename templates (â
COMPLETED in v1.1.0)
- Object dependency tracking (â
COMPLETED in v1.1.0)
- Git integration for conflict detection
- Team synchronization features
📝 Changelog
Version 1.0.0
- Initial release
- Support for all standard AL object types
- Configurable ID ranges and settings
- Quick Pick interface with visual icons
- Context menu integration
- Keyboard shortcuts and command palette access
- Auto-refresh and caching for performance
- Filename suggestion generation
- Range validation and warnings
Made with â¤ī¸ for Business Central developers who need better ID management!
â Support This Extension
If this extension has saved you time and improved your AL development workflow, consider supporting its development:

Your support helps:
- ⨠Keep the extension free for everyone
- 🚀 Fund new features and improvements
- 🐛 Fix bugs and maintain compatibility
- 📚 Create better documentation
Thank you for using AL Object ID Suggester! 🙏