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
🎯 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 5: View All Ranges
- Command:
AL Object ID: Show All Object ID Ranges
- See current usage across all object types
📖 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
}
🎯 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)
- Integration with AL Language extension
- Export ID usage reports
- Bulk ID validation
- 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! 🙏