You are previewing Programming Microsoft® Dynamics™ NAV: Create, modify, and maintain applications in NAV 5.0, the latest version of the ERP application formerly known as Navision.
O'Reilly logo
Programming Microsoft® Dynamics™ NAV: Create, modify, and maintain applications in NAV 5.0, the latest version of the ERP application formerly known as Navision

Book Description

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.

Microsoft® Dynamics(tm) NAV (formerly known as Navision) is a well established Enterprise Resource Planning (ERP) application, part of the Microsoft® Dynamics(tm) 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.

  • 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

  • Table of Contents

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