Microsoft Dynamics NAV 2009 Developer Tools: Essential Guide for CustomizationMicrosoft Dynamics NAV 2009 remains a widely used ERP platform in many small and mid-sized businesses. Although newer versions exist, NAV 2009 is still supported in legacy environments and many organizations rely on its stability. Customization is often required to adapt the system to unique business processes — this guide walks through the developer tools, core concepts, best practices, and practical steps to customize NAV 2009 safely and effectively.
Who this guide is for
This article is for developers, technical consultants, and solution architects who maintain or extend Microsoft Dynamics NAV 2009 installations. Basic familiarity with NAV concepts (tables, pages, codeunits, reports) and the C/AL language is assumed. The guide covers both the classic client and the RoleTailored Client (RTC / Windows client) development scenarios relevant to NAV 2009.
Overview of NAV 2009 developer environment
Key developer components in NAV 2009:
- C/SIDE (Client/Server Integrated Development Environment) — the classic development environment used to edit objects (tables, pages, reports, codeunits, forms, dataports, etc.) and write C/AL code.
- C/AL (C/SIDE Application Language) — NAV’s proprietary procedural language used for business logic.
- NAV Development Environment (Classic IDE) — the integrated object designer for editing objects and running the debugger.
- RoleTailored Client (RTC) Development Add-ins — for NAV 2009, RTC introduced new object types (pages) and UI paradigms; developers often switch between classic and RTC development modes.
- Object Designer & Object Designer Tools — export, import, compare, and compile NAV objects.
- Debugger & Tracing Tools — step-through debugging and client/server tracing to troubleshoot logic and performance.
- SQL Server Management Studio (SSMS) — NAV 2009 stores data in Microsoft SQL Server; understanding and using SSMS for backups, queries, and maintenance is essential.
- Windows PowerShell / Administration Tools — for automating service tasks and deployments (limited compared to later NAV versions).
Core customization concepts
- Objects: tables, forms/pages, reports, codeunits, queries, menus, dataports. In NAV 2009, some customers still use classic forms while others use RTC pages — know which your tenant uses.
- Extensions: NAV 2009 has no extension framework (unlike Business Central), so customizations are done by modifying or adding objects directly. That increases upgrade complexity.
- Overlayering: Customizations typically overlayer base objects — keep modifications minimal and well-documented to ease future upgrades.
- Localizations: NAV deployments often include local country/industry customizations. Maintain separation between base objects and localization changes.
Setting up a safe development environment
- Use a dedicated development database and NAV service instances — never develop directly on production.
- Version control: export NAV objects (text or fob files) regularly and store them in a source control system (Git, SVN). Many teams use periodic exports per object type.
- Naming conventions: adopt prefixes/suffixes for custom objects (e.g., ZU_, 50000+ object IDs) to avoid collisions with Microsoft objects.
- Use the NAV debugger and set breakpoints for complex logic. Enable SQL Server Profiler only on development/test instances to trace long-running queries.
- Document every change in a changelog table or a ticketing system entry referencing object IDs and reasons for change.
Common customization tasks and how to approach them
1) Adding fields to tables and pages/forms
- Add the field to the table first with appropriate data type and length. If the table is large, consider indexing and performance implications.
- Add the field to the corresponding form/page. For RTC pages, define the control and bind to the new field.
- Update any relevant codeunits, reports, and integration routines to include the new field where necessary.
Practical tip: When altering primary keys or adding mandatory fields, plan data migration scripts to populate values for existing records.
2) Modifying business logic (C/AL)
- Locate the relevant trigger or function (OnValidate, OnInsert, OnModify, etc.). Use meaningful procedure names for reusable logic.
- Keep procedures short and document their purpose with comments.
- When changing existing triggers, consider adding calls to new codeunits instead of inlining long logic — improves reusability and testing.
3) Creating new pages and forms (RTC)
- Design the page layout around user roles — NAV 2009 introduced RoleTailored Client for role-based pages.
- Add action controls for common tasks. Use FactBoxes to show contextual information.
- Test usability with sample users; NAV 2009’s RTC can behave differently than classic forms.
4) Reports and layouts
- NAV 2009 supports classic report layouts and RDLC (Visual Studio) layouts for RTC. Choose the layout type based on client needs.
- For RDLC reports, use Visual Studio to edit .rdl layout and test on the report server or locally using NAV report preview.
- Ensure datasets include required fields and are optimized to avoid fetching unnecessary data.
5) Integration and web services
- NAV 2009 exposed SOAP web services for pages and codeunits. Publish codeunits/pages as web services and secure them using NAV user credentials or Windows auth.
- For performance-sensitive integrations, consider batch patterns: queue changes in a table and process them in background codeunits.
- Use GUID-based mapping when integrating with external systems to avoid primary key conflicts.
Debugging and performance tuning
- Use the C/SIDE debugger to step through C/AL code. For server-side code, attach the debugger to the NAV service tier.
- Use SQL Server Profiler and Execution Plans to find slow queries. Identify missing indexes — create them carefully.
- Keep transactions short. Avoid long-running transactions that lock large numbers of rows.
- Watch for loops over Record.FindSet/Next — prefer filtered queries and set-based operations where possible.
- Monitor NAV Service Tier and Client event logs for memory leaks or crashes; restart services on non-production systems while testing fixes.
Upgrade and maintainability considerations
- Keep custom code isolated: use wrapper codeunits and versioned object IDs to make it easier to identify and re-apply customizations during upgrades.
- Document all modifications in a single place (object change log) and maintain export snapshots of the database and objects before applying major updates.
- When preparing to upgrade to newer NAV or Business Central versions, perform a thorough object comparison between your custom objects and the target standard objects to determine merge efforts.
- Consider redesigning heavily modified processes before migrating — sometimes a fresh implementation on the newer platform is faster than migrating tangled customizations.
Security and permissions
- Use NAV permission sets and user groups instead of assigning permissions individually. Create role-based permission sets for custom pages and codeunits.
- Test permissions by creating sample users for each role and verifying access in the RTC and Classic clients.
- Protect exposed web services with least-privilege service accounts. Use HTTPS and firewall rules for external integrations.
Testing strategy
- Unit testing in NAV 2009 is manual — create test companies and test data. Automate where possible using scripts to create/tear down test companies and seed data.
- Create test cases for typical business scenarios and edge cases (currency rounding, negative inventories, batch processing).
- Use a staged deployment path: develop → test → acceptance → production. Validate each deployment on the acceptance environment with representative data.
Example: Add a customer-facing flag and use it in a sales workflow (step-by-step)
- Table: Add boolean field “ShowOnPortal” to the Customer table (ID: 50001).
- Page: Add a checkbox control bound to 50001.ShowOnPortal on the Customer Card page.
- Codeunit: Create a codeunit (50002) with a procedure UpdatePortalCustomers that filters customers where ShowOnPortal = TRUE and publishes them via a web service or writes to an export table.
- Report/Integration: Create a batch job page that calls 50002.UpdatePortalCustomers and logs results to a custom log table.
- Permissions: Create a permission set that allows the web service account to read the customer table and execute codeunit 50002.
- Tests: Create a test customer, flip the checkbox, run the batch, and verify the export contains the customer.
Tools and resources checklist
- NAV 2009 Development Environment (C/SIDE) installed on a dev machine.
- SQL Server + SSMS for database access.
- Visual Studio (for RDLC report layouts).
- Source control (Git/SVN) for exported objects.
- Test/QA NAV instances and sample companies.
- Documentation template for change logs and design notes.
Best practices summary
- Develop on non-production environments.
- Keep customizations modular and well-documented.
- Use consistent naming and object ID conventions.
- Minimize overlayering—prepare for future upgrades.
- Test thoroughly and monitor performance.
This guide outlines the essential developer tools, processes, and practices for customizing Microsoft Dynamics NAV 2009. If you want, I can convert any of the sections into step-by-step tutorials (e.g., adding a field and updating reports), produce sample C/AL code snippets, or provide a checklist tailored to your environment — tell me which section to expand.
Leave a Reply