Programming Microsoft® Dynamics™ NAV

Programming Microsoft® Dynamics™ NAV
eBook: $35.99
Formats: PDF, PacktLib, ePub and Mobi formats
save 40%!
Print + free eBook + free PacktLib access to the book: $95.98    Print cover: $59.99
save 37%!
Free Shipping!
UK, US, Europe and selected countries in Asia.
Also available on:
Table of Contents
Sample Chapters
  • For experienced programmers with little or no previous knowledge of NAV development
  • Learn as quickly as possible to create, modify, and maintain NAV applications
  • Written for version 5.0 of NAV; applicable for all versions


Book Details

Language : English
Paperback : 480 pages [ 235mm x 191mm ]
Release Date : October 2007
ISBN : 1904811744
ISBN 13 : 9781904811749
Author(s) : David A. Studebaker
Topics and Technologies : All Books, Enterprise Products and Platforms, Microsoft Dynamics, Microsoft, .NET

Table of Contents

Chapter 1: The Basic Ingredients
Chapter 2: Tables
Chapter 3: Fields
Chapter 4: Forms
Chapter 5: Reports
Chapter 6: Introduction to C/SIDE and C/AL
Chapter 7: Intermediate C/AL
Chapter 8: Advanced NAV Development
Chapter 9: Designing NAV Modifications
Chapter 10: External Interfaces
Chapter 11: Design to Succeed
  • Chapter 1: The Basic Ingredients
    • Some Unique NAV Terms Defined
    • The C/SIDE Integrated Development Environment
      • Object Designer Tool Icons
    • Seven Kinds of NAV Objects
    • More Definitions (Related to NAV)
    • NAV Functional Terminology
    • Getting Started with Application Design
      • Tables
        • Example: Table Design
        • Example: Table Creation
      • Forms
        • Card Forms
        • Tabular Forms
        • Main/Sub Forms
        • Matrix Forms
        • Trendscape Forms
        • All Forms
        • Creating a Card Form
        • Creating a List Form
      • Reports
        • Creating a List Format Report
    • Codeunits
    • MenuSuites
    • Dataports
    • XMLports
    • Integration Tools
    • Backups and Documentation
    • Summary
  • Chapter 2: Tables
    • Overview of Tables
      • What Makes Up a Table?
      • Table Naming
      • Table Numbering
      • Table Properties
      • Table Triggers
      • Keys
      • SumIndexFields
    • Expanding Our Sample Application
      • Table Creation and Modification
      • Keys
      • Adding Some Activity-Tracking Tables
      • New Tables
      • Keys and SumIndexFields in Our Examples
    • Types of Tables
      • Totally Modifiable Tables
      • Content-Modifiable Tables
      • Read-Only Tables
    • Summary
  • Chapter 3: Fields
    • Fields
      • Field Properties
      • Field Numbering
        • Renumbering a Field
        • Changing the Data Type of a Field
      • Field Triggers
      • Some Data Structure Examples
    • More Definitions
    • Variable Naming
    • Data Types
      • Fundamental Data Types
        • Numeric Data
        • String Data
        • Time Data
      • Complex Data Types
        • Data Item
        • DateFormula
        • Data Structure
        • Objects
        • Automation
        • Input/Output
        • References and Other
      • Data Type Usage
    • FieldClasses
    • Filtering
      • Defining Filter Syntax and Values
        • Experimenting with Filters
    • Summary
  • Chapter 4: Forms
    • What Is a Form?
      • Controls
      • Bound and Unbound
    • NAV Form Look and Feel
    • Types of Forms
      • Accessing the Form Designer
      • What Makes Up a Form?
        • Form Properties
      • Forms Controls
        • Explore
        • Inheritance
        • Experimenting with Controls
      • Control Triggers
      • Control Properties
        • Experimenting with Control Properties
        • Some Control Property Tips
      • More Illumination with C/ANDL
        • Update the Member Forms
      • Testing Forms
        • Creative Plagiarism
        • Form Design Hints
      • A Quick Tour of the Form Designer
    • Keys to Learning NAV
    • Summary
  • Chapter 5: Reports
    • What is a Report?
    • NAV Report Look and Feel
    • NAV Report Types
      • Report Types Summarized
    • Report Naming
    • Report Components Overview
      • The Components of a Report Description
    • Report Data Flow
    • The Elements of a Report
      • Report Properties
      • Report Triggers
      • Data Items
      • Data Item Properties
      • Data Item Triggers
      • Data Item Sections
        • Run-Time Formatting
        • Report Wizard-Generated Sections
        • Report Section Descriptions
        • More Run-Time Formatting
        • Section Properties
        • Section Triggers
      • Controls for Reports
        • Control Properties
        • Inheritance
    • Request Form
      • Request Form Properties
      • Request Form Triggers
      • Request Form Controls
      • Request Form Control Triggers
    • Processing-Only Reports
    • Revising a Generated Report
      • Revision—First Design
      • Revision—Second Design
    • Creating a Report from Scratch
      • Creative Report Plagiarism
    • Special Output Issues
      • Printing PDF Files
      • Printing HTML Formatted Output
      • Printing to an Impact Printer
    • Summary
  • Chapter 6: Introduction to C/SIDE and C/AL
    • Essential Navigation
      • Object Designer
        • Starting a New Object
        • Some Designer Navigation Pointers
        • Exporting Objects
        • Importing Objects
        • Text Objects
      • Object Numbers
      • Some Useful Practices
      • Changing Data Definitions
      • Saving and Compiling
      • Some C/AL Naming Conventions
      • Variables
        • Global Variables
        • Local Variables
        • Special Working Storage Variables
      • A Definition of Programming in C/SIDE
      • Functions
      • Basic C/AL Syntax
        • Assignment and Punctuation
        • Wild Cards
        • Expressions
        • Operators
    • Some Basic C/AL
      • MESSAGE, ERROR, CONFIRM, and STRMENU Functions
    • SETCURRENTKEY Function
    • SETRANGE Function
    • GET Function
    • FIND–NEXT Functions
    • BEGIN–END Compound Statement
    • IF–THEN–ELSE Statement
    • Indenting Code
  • Some Simple Coding Modifications
    • Adding a Validation to a Table
    • Adding Code to Enhance a Report
  • Summary
  • Chapter 7: Intermediate C/AL
    • Development
      • C/AL Symbol Menu
      • Internal Documentation
    • Computation—Validation Utility Functions
      • VALIDATE
      • ROUND
      • WORKDATE Function
    • Data Conversion Functions
      • FORMAT Function
      • EVALUATE Function
    • DATE Functions
      • DATE2DMY Function
      • DATE2DWY Function
      • DMY2DATE and DWY2DATE Functions
      • CALCDATE Function
    • FlowField-SumIndex Functions
      • CALCFIELDS Function
      • CALCSUMS Function
    • Flow Control
      • REPEAT–UNTIL Control Structure
      • WHILE–DO Control Structure
      • CASE–ELSE Statement
      • WITH–DO Statement
      • QUIT, BREAK, EXIT, SKIP, and SHOWOUTPUT Functions
        • QUIT Function
        • BREAK Function
        • EXIT Function
        • SKIP Function
        • SHOWOUTPUT Function
    • Input and Output Functions
      • NEXT Function (with FIND)
      • INSERT Function
      • MODIFY Function
        • Rec and xRec
      • DELETE Function
      • MODIFYALL Function
      • DELETEALL Function
    • Filtering
      • SETRANGE Function
      • SETFILTER Function
      • COPYFILTER and COPYFILTERS Functions
      • GETFILTER and GETFILTERS Functions
      • MARK Function
      • CLEARMARKS Function
      • MARKEDONLY Function
      • RESET Function
    • InterObject Communication
      • Via Data
      • Via Function Parameters
      • Via Object Calls
    • Use the New Knowledge
      • A Development Challenge for You
        • Phase 1
        • Phase 2
        • Phase 3
      • A Sample Approach to the Challenge
        • Phase 1
        • Phase 2
        • Phase 3
    • Summary
  • Chapter 8: Advanced NAV Development
    • Callable Functions
      • Codeunit – 358 Date Filter-Calc
      • Codeunit 359 – Period Form Management
      • Codeunit 365 – Format Address
      • Codeunit 396 – NoSeriesManagement
      • Codeunit 397 – Mail
      • Codeunit 408 – Dimension Management
      • Codeunit 412 – Common Dialog Management
    • Sampling of Function Models to Review
      • Codeunit 228 – Test Report-Print
      • Codeunit 229 – Print Documents
      • Some other Objects to Review
      • Management Codeunits
    • Documenting Modifications
    • Multi-Language
    • Multi-Currency
    • Code Analysis and Debugging Tools
      • Developer's Toolkit
        • Relations to Tables
        • Relations from Objects
        • Source Access
        • Where Used
        • Try it Out
      • Working in Exported Text Code
      • Using Navigate
        • Testing with Navigate
      • The Debugger
      • The Code Coverage Tool
      • Dialog Function Debugging Techniques
        • Debugging with MESSAGE
        • Debugging with CONFIRM
        • Debugging with DIALOG
        • Debugging with Text Output
        • Debugging with ERROR
    • Summary
  • Chapter 9: Designing NAV Modifications
    • Starting a New NAV Enhancement Project
    • Design of NAV Modifications
      • Knowledge is Key
    • Creating a New Functional Area
      • Advantages of Designing New Functionality
    • Enhancing an Existing Functional Area
    • NAV Development Time Allocation
    • Data-Focused Design for New Functionality
      • Define the Big Picture: The End Goals
        • A Simple Sample Project
      • Then Define the Little Pictures
        • Sample Project Continued—1
      • Define What Data is Required to Create the Pictures
        • Sample Project Continued—2
      • Define the Sources for the Data
        • Sample Project Continued—3
      • Define the Data "Views"
        • Sample Project Continued—4
      • Other Factors Must Always be Considered
    • NAV Processing Flow
      • Data Preparation
      • Enter Transactions
      • Provide for Additional Data Testing
      • Post the Journal Batch
      • Access the Data
      • Continuing Maintenance
    • Designing a New NAV Application Functionality
      • Define the Data Tables
      • Design the User Data Access Interface
      • Design the Data Validation
      • Appropriate Data Design Sequence
      • Design Posting Processes
      • Design Support Processes
      • Double-Check Everything
    • Summary
  • Chapter 10: External Interfaces
    • MenuSuites
      • MenuSuite Levels
      • MenuSuite Structure
        • MenuSuite Internal Structure
        • MenuSuite Development
        • NAV Menus before V4.0
    • Dataports
      • Dataport Components
        • Dataport Properties
        • Dataport Triggers
      • Data Item
        • Data Item Properties
        • Data Item Triggers
      • Dataport Fields
        • Dataport Field Properties
        • Dataport Field Triggers
    • XMLports
      • XMLport Components
        • XMLport Properties
        • XMLport Triggers
        • XMLport Data Lines
        • XMLport Line Properties
        • Element or Attribute
        • XMLport Line Triggers
    • Advanced Interface Tools
      • Automation Controller
      • NAV Communication Component
      • Linked Server Data Sources
      • NAV ODBC
      • C/OCX
      • C/FRONT
      • NAV Application Server (NAS)
    • Summary
  • Chapter 11: Design to Succeed
    • Design for Efficiency
      • Disk I/O
      • Locking
      • C/SIDE versus SQL Server Databases
      • SQL Server I/O Commands
        • FINDFIRST Function
        • FINDLAST Function
        • FINDSET Function
    • Design for Updating
      • Customization Project Recommendations
        • One at a Time
        • Design, Design, Design
        • Test, Test, Test
    • Plan for Upgrading
      • Benefits of Upgrading
      • Coding Considerations
        • Good Documentation
        • Low-Impact Coding
      • The Upgrade Process
        • Upgrade Executables Only
        • Full Upgrade
    • Tips for Small Successes
      • Cache Settings for Development
      • Two Monitors
      • Simple System Administration
      • Careful Naming
    • Tools
      • Code Coverage
      • Client Monitor
      • Creating Help for Modifications
      • Implementation Tool
      • Other Reference Material
    • Summary

David A. Studebaker

David Studebaker is Chief Technical Officer and a founder of Liberty Grove Software with his partner Karen Studebaker. Liberty Grove Software, a Microsoft Partner, provides development, consulting, training, and upgrade services internationally for Microsoft Dynamics NAV resellers and end user customers.

David has been recognized by Microsoft as a Certified Professional for NAV in all three areas: Development, Applications, and Installation & Configuration. He has been honored by Microsoft as a Lead Certified Microsoft Trainer for NAV.

David just celebrated his first half century of programming, having started programming in 1962. He has been developing in C/AL since 1996. David has been an active participant in each step of computing technology from the first solid state mainframes to today's technology, from binary assembly language coding to today's C/AL and C#.

David's special achievements include his role as co-developer of the first production multi-programmed SPOOLing system in 1967. David has worked on a diverse set of software applications including manufacturing, distribution, retail, engineering, general accounting, association management, professional services billing, distribution/inventory management, freight carriage, data collection and production management, among others. Prior to co-authoring this book, David was the author of Programming Microsoft Dynamics NAV (for the Classic Client) and Programming Microsoft Dynamics NAV 2009 (for the Role Tailored Client).

David has had a wide range of development, consulting, sales and management roles throughout his career. He has been partner or owner and manager of several software development businesses, while always maintaining a hands-on role as a business applications developer.

David has a BS in Mechanical Engineering from Purdue University and an MBA from the University of Chicago. He has been writing for publication since he was an undergraduate. David has been a member of the Association for Computing Machinery since 1963 and was a founding officer of two local chapters of the ACM.

Sorry, we don't have any reviews for this title yet.

Submit Errata

Please let us know if you have found any errors not listed on this list by completing our errata submission form. Our editors will check them and add them to this list. Thank you.


- 5 submitted: last submission 30 Dec 2011

Errata type: Typo | Page number: 15

Form: These are this screen display... Should read: These are the screen display...


Errata type: Typo | Page number: 105

the line "WD5 = the next fifth day of week, 03/17/07" should read "WD5 = the next fifth day of week, 03/16/07"


Errata type: Typo | Page number: 105

The Sentence Fragment: "item number 1928-S, has 149 lamps in stock in the BLUE warehouse and 55 in the GREEN warehouse. At the same time, we show a negative inventory in the RED warehouse," should read: "item number 1928-S, has 149 lamps in stock in the BLUE warehouse and 55 in the RED warehouse. At the same time, we show a negative inventory in the GREEN warehouse,"


Errata type: Typo | Page number: 131

The 3-d line from top. Sort (Shift+F7) - current Sort (Shift+F8) - correct


Errata type: Technical| Page number: 165

Paragraph 2 The two references to the Table Box control should be Subform control as neither of the properties SubFormView or SubFormLink exist for Table Box control.


Sample chapters

You can view our sample chapters and prefaces of this title on PacktLib or download sample chapters in PDF format.

Frequently bought together

Programming Microsoft® Dynamics™ NAV +    BPEL pour les services web : Deuxième Edition [French] =
50% Off
the second eBook
Price for both: $65.60

Buy both these recommended eBooks together and get 50% off the cheapest eBook.

What you will learn from this book

  • Become confident with basic NAV definitions and conventions
  • Understand the design and development process of a NAV application
  • Understand the unique aspects of the NAV data and process flows
  • Data Types, Tables, Forms, Reports, and Codeunits
  • C/SIDE and C/AL basics – essential navigation, object construction, numbering, basic syntax, naming rules, SIFT technology, string operators and functions, numeric operators and functions, logical and relational operators and functions
  • Control Logic and Flow – Conditional statements, I/O statements, sorting, filtering, data flow, FlowFields, process logic flow, creating new functions, documentation, testing
  • Advanced C/AL – modifying existing functions, creating new objects, finding code models, advanced debugging techniques

Chapter 1
covers basic definitions as they pertain to NAV and C/SIDE. It also provides an introduction to seven types of NAV objects, Form and Report Creation Wizards, and tools that we use to integrate NAV with external entities, and ends with a brief discussion of how different types of backups and documentation are handled in C/SIDE.

Chapter 2 focuses on the top level of NAV data structure, tables and their structures. You will work your way through hands-on creation of a number of tables in support of an example application. You will review most types of tables found in the out-of-the-box NAV application.

In Chapter 3, you will learn about the basic building blocks of NAV data structure, fields and their attributes, data fields that are available and field structure elements (properties, triggers) for each type of field. This chapter covers the broad range of Data Type options as well as Field Classes, shows you one of the date calculation tools that gives C/AL an edge in business, and discusses the concept of filtering and how it can be considered as you design your database structure.

In Chapter 4, you will review different types of forms and work with some of them, and review all the controls that can be used in forms. You will learn to use the Form Wizard and have a good introduction to the Form Designer. You will expand your example system, creating a number of forms for data maintenance and inquiry.

In Chapter 5, you will learn about on the structural and layout aspects of NAV Report objects. Also, you will experiment with some of the tools and continue to expand your example application.

Chapter 6 will help you learn about the General Object Designer Navigation as well as more specific navigation of individual (Table, Form, Report) Designers. This chapter also covers variables of various types created and controlled by the developer or by the system, basic C/AL syntax, and some essential C/AL functions.

Chapter 7 covers a number of practical tools and topics regarding C/AL coding and development. You will learn about C/AL Symbol Menu and how it assists in development. This chapter also discusses various Computation, Validation and Data Conversion functions, Dates, Flowfields and SIFT, Processing Flow Control, Input–Output, and Filtering functions.

In Chapter 8, you will review a number of tools and techniques aimed at making the life of a NAV developer easier and more efficient. There is also a section on Code Analysis and Debugging.

Chapter 9 will help you deal with software design for NAV. It will help you with the design of NAV modification, creating a new function area or enhancing an existing functional area, and also provides you with the information needed for designing a new NAV application.

Chapter 10 focuses on interfaces with NAV. Overall, you will learn about MenuSuites, Dataports, XMLports, and advanced Interfaces in this chapter.

Chapter 11 will help you become even more productive in C/AL development. It provides some tips for design efficiency and it will help you learn about updating and upgrading the system and more about enjoying working with NAV.

In Detail

Microsoft® Dynamics™ NAV (formerly known as Navision) is a well established Enterprise Resource Planning (ERP) application, part of the Microsoft® Dynamics™ family.

Renowned for its challenging learning curve, Dynamics NAV is a complex piece of software with a unique design structure and, for developers learning to modify or enhance it for vital business purposes, the task can sometimes be overwhelming.

This book will ease you through the complexities of NAV application development. You will learn the skills and develop the confidence to tackle your own critical NAV applications. This book will act as your experienced NAV programming mentor, helping you to become productive as a NAV developer much more quickly.

From basic NAV terminology and concept definitions, through the essential building blocks of NAV data structure and objects, you will gain an understanding of the fundamental underlying concepts of NAV. You will learn practical details about NAV object construction and the tools available, including the Table, Form, and Report Designers. You will learn how to use NAV’s tools to effectively navigate through the various features of objects, including properties, triggers, and C/AL code and receive practical guidance on ways to develop and test in the unique NAV C/SIDE development environment. 

A section on software design for NAV is provided along with tips for efficient design of a new NAV application or enhancing an existing application. With its comprehensive collection of NAV information, this book is not only designed to help you learn, but can act as a reference as well.

Created especially for experienced programmers with no previous knowledge of NAV development, this book is for people who want to learn as quickly as possible to create, modify or maintain NAV applications.

Visit the Free Online Edition and read the full table of contents, including summaries of each chapter as well as chapter 1 in full.


Fast-paced and to-the-point, this book takes you through the important topics of Microsoft® Dynamics™ NAV with clear explanations and practical example code. The book's selection of topics is driven by what the working developer needs to know in order to become productive as quickly as possible.

Who this book is for

  • The business applications software designer/developer who:


  • Wants to become productive in NAV C/SIDE – C/AL development as quickly as possible
  • Understands business applications and the associated software
  • Has significant programming experience
  • Has access to NAV including at least the Designer granules, preferably a full development license and a standard Cronus demo database
  • Is willing to do the exercises to get hands-on experience


  • The Reseller manager or executive who wants a concise, in depth view of NAV’s development environment and tool set
  • The technically knowledgeable manager or executive of a firm using NAV that is about to embark on a significant NAV enhancement project
  • The technically knowledgeable manager or executive of a firm considering purchase of NAV as a highly customizable business applications platform

The reader of this book:

  • Does not need to be expert in object-oriented programming
  • Does not need to have previous experience with NAV

Buy Programming Microsoft Dynamics NAV










Code Download and Errata
Packt Anytime, Anywhere
Register Books
Print Upgrades
eBook Downloads
Video Support
Contact Us
Awards Voting Nominations Previous Winners
Judges Open Source CMS Hall Of Fame CMS Most Promising Open Source Project Open Source E-Commerce Applications Open Source JavaScript Library Open Source Graphics Software
Open Source CMS Hall Of Fame CMS Most Promising Open Source Project Open Source E-Commerce Applications Open Source JavaScript Library Open Source Graphics Software