Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>AL Object ID Suggester - Next Available ID FinderNew to Visual Studio Code? Get it now.
AL Object ID Suggester - Next Available ID Finder

AL Object ID Suggester - Next Available ID Finder

GingerTurtle

|
92 installs
| (0) | Free
| Sponsor
đŸ”ĸ Instantly find the next available Object ID for Business Central AL development. Scans workspace files and suggests sequential IDs for Pages, Tables, Codeunits, and more.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

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:

Buy Me A Coffee


🚀 Quick Start

Installation

  1. From VS Code Marketplace:

    ext install renni-dev.al-object-id-suggester
    
  2. From VSIX file:

    • Download the .vsix file
    • Open VS Code → Extensions → Install from VSIX

Basic Usage

Method 1: Create AL File Instantly (NEW! 🚀)

  1. Open Command Palette (Ctrl+Shift+P)
  2. Type: AL Object ID: Create AL Object File
  3. Select object type (Page, Table, Codeunit, etc.)
  4. Enter object name
  5. Done! - File created with proper structure and next available ID

Method 2: Quick ID Suggestion

  1. Press Ctrl+Shift+Alt+I (Windows/Linux) or Cmd+Shift+Alt+I (Mac)
  2. Select your object type from the list
  3. 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

Method 4: Context Menu

  • Right-click any .al file → "Suggest Next Available Object ID"
  • Right-click folder → "Create AL Object File"

Method 6: Export ID Usage Report (NEW! 📊)

  1. Open Command Palette (Ctrl+Shift+P)
  2. Type: AL Object ID: Export ID Usage Report
  3. Choose format (CSV, JSON, or both)
  4. Report Generated! - Comprehensive analysis with validation issues

Method 7: Bulk Validate Object IDs (NEW! ✅)

  1. Open Command Palette (Ctrl+Shift+P)
  2. Type: AL Object ID: Bulk Validate Object IDs
  3. View comprehensive validation results
  4. Fix Issues! - Get suggestions for duplicates, gaps, and compliance

Method 8: Track Object Dependencies (NEW! 🔄)

  1. Open Command Palette (Ctrl+Shift+P)
  2. Type: AL Object ID: Track Object Dependencies
  3. Explore object relationships and dependencies
  4. Analyze! - Understand your codebase structure

Method 9: Configure Filename Templates (NEW! 🎯)

  1. Open Command Palette (Ctrl+Shift+P)
  2. Type: AL Object ID: Configure Filename Templates
  3. Customize templates with placeholders
  4. 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"
  }
}

alObjectId.exportFormat

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

  1. Need a new Page? → Ctrl+Shift+Alt+I → Select "Page" → Get ID 50124
  2. Copy the suggested filename: PAG50124.NewObject.al
  3. Create your file with the correct ID
  4. 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

  1. Clone the repository:

    git clone https://github.com/renni-dev/al-object-id-suggester
    cd al-object-id-suggester
    
  2. Install dependencies:

    npm install
    
  3. Compile:

    npm run compile
    
  4. 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

Performance Issues

  • 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:

Buy Me A Coffee

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! 🙏

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
Š 2026 Microsoft