You are previewing Programming Microsoft Dynamics™ NAV 2015.
O'Reilly logo
Programming Microsoft Dynamics™ NAV 2015

Book Description

Sharpen your skills and increase your productivity when programming Microsoft Dynamics NAV 2015

In Detail

NAV 2015 is a complete ERP system, which also contains a robust set of development tools to support customization and enhancement. These include an object designer for each of seven application object types, a business application-oriented programming language with .NET interface capability, a compiler, a debugger, and programming testing language support.

This book is designed to take you from an introduction to the product and its integrated development tools to being a productive developer in the NAV 2015 environment. It will serve as a comprehensive reference guide, complementing NAV's Help files. You will find this book really useful if you want to evaluate the product's development capabilities or need to manage NAV 2015 based projects. Additionally, you will also learn about the NAV application structure, the C/SIDE development environment, the C/AL language, the construction and uses of each object type, and how it all fits together.

What You Will Learn

  • Extract and utilize NAV data using queries and reports

  • Use the integrated debugger, the .NET interface, and C/AL extensions for automated testing

  • Understand NAV's data element choices, properties, and usages

  • Discover how to successfully deliver an interactive user data presentation

  • Sharpen your skills and increase your productivity with Microsoft Dynamics NAV

  • Get to grips with the fundamental programming and design concepts of Microsoft Dynamics NAV 2015

  • Downloading the example code for this book. You can download the example code files for all Packt books you have purchased from your account at http://www.PacktPub.com. If you purchased this book elsewhere, you can visit http://www.PacktPub.com/support and register to have the files e-mailed directly to you.

    Table of Contents

    1. Programming Microsoft Dynamics™ NAV 2015
      1. Table of Contents
      2. Programming Microsoft Dynamics™ NAV 2015
      3. Credits
      4. Foreword
      5. About the Authors
      6. Acknowledgments
      7. About the Reviewers
      8. www.PacktPub.com
        1. Support files, eBooks, discount offers, and more
          1. Why subscribe?
          2. Free access for Packt account holders
          3. Instant updates on new Packt books
      9. Preface
        1. A brief history of NAV
          1. The beginning
          2. Single user PC Plus
          3. The multi-user Navigator
          4. Navision Financials for Windows
        2. Growth and mergers
        3. Continuous enhancement
        4. C/AL's Roots
        5. What you should know
        6. What this book covers
        7. What you need for this book
        8. Who this book is for
        9. Conventions
        10. Reader feedback
        11. Customer support
          1. Downloading the example code
          2. Errata
          3. Piracy
          4. Questions
      10. 1. An Introduction to NAV 2015
        1. NAV 2015 – an ERP system
          1. Financial Management
          2. Manufacturing
          3. Supply Chain Management
          4. Business Intelligence and reporting
          5. Relationship Management
          6. Human Resource management
          7. Project Management
        2. Significant changes in NAV 2015
          1. Application changes
          2. Client enhancements
          3. Development tools
          4. Other areas
        3. A developer's overview of NAV 2015
          1. NAV object types
          2. The C/SIDE integrated development environment
          3. Object Designer tool icons
          4. The C/AL programming language
          5. NAV object and system elements
          6. NAV functional terminology
          7. User interface
        4. Hands-on development in NAV 2015
          1. The NAV 2015 development exercise scenario
          2. Getting started with application design
          3. Application tables
            1. Designing a simple table
            2. Creating a simple table
          4. Pages
            1. Standard elements of pages
            2. List pages
            3. Card pages
            4. Document pages
            5. Journal/Worksheet pages
          5. Creating a List page
          6. Creating a Card page
          7. Creating some sample data
          8. Creating a List Report
          9. Other NAV object types
            1. Codeunits
            2. Queries
            3. MenuSuites
            4. XMLports
          10. Development backups and documentation
        5. Summary
        6. Review questions
      11. 2. Tables
        1. An overview of tables
          1. Components of a table
          2. Naming a table
          3. Table numbering
          4. Table properties
          5. Table triggers
          6. Keys
          7. SumIndexFields
          8. Field Groups
        2. Enhancing our sample application
          1. Creating and modifying tables
          2. Assigning a Table Relation property
          3. Assigning an InitValue property
          4. Adding a few activity-tracking tables
          5. New tables for our WDTU project
          6. New list pages for our WDTU project
          7. Keys, SumIndexFields, and table relations in our examples
            1. Secondary keys and SumIndexFields
            2. Table relations
          8. Modifying a standard table
          9. Version list documentation
        3. Types of tables
          1. Fully Modifiable tables
            1. Master
            2. Journal
            3. Template
            4. Ledger
            5. Reference tables
            6. Register
            7. Posted Document
            8. Setup
            9. Temporary
          2. Content modifiable tables
            1. System
          3. Read-only tables
            1. Virtual
        4. Summary
        5. Review questions
      12. 3. Data Types and Fields
        1. Basic definitions
        2. Fields
          1. Field properties
          2. Field triggers
          3. Data structure examples
          4. Field numbering
          5. Field and Variable naming
        3. Data types
          1. Fundamental data types
            1. Numeric data
            2. String data
            3. Date/Time data
          2. Complex data types
            1. Data structure
            2. Objects
            3. Automation
            4. Input/Output
            5. DateFormula
            6. References and other data types
          3. Data type usage
        4. FieldClass property options
          1. FieldClass – Normal
          2. FieldClass – FlowField
          3. FieldClass – FlowFilter
          4. FlowFields and a FlowFilter for our application
        5. Filtering
          1. Experimenting with filters
          2. Accessing filter controls
            1. Development Environment filter access
            2. Role Tailored Client filter access
        6. Summary
        7. Review questions
      13. 4. Pages – The Interactive Interface
        1. Page design and structure overview
          1. Page design guidelines
          2. The NAV 2015 page structure
        2. Types of pages
          1. Role Center page
          2. List page
          3. Card page
          4. Document page
            1. FastTab
          5. ListPlus page
          6. Worksheet (Journal) page
          7. ConfirmationDialog page
          8. StandardDialog page
          9. NavigatePage
            1. Navigate page 344
          10. Special pages
            1. Request page
            2. Departments page
          11. Page parts
            1. FactBox Area
              1. CardParts and ListParts
          12. Charts
            1. Chart part
              1. Chart Control Add-in
          13. Page names
        3. Page Designer
          1. New Page Wizard
        4. Page components
          1. Page Triggers
          2. Page properties
          3. Page Preview tool
          4. Inheritance
        5. WDTU Page Enhancement – part 1
        6. Page controls
          1. Control types
            1. Container controls
            2. Group controls
            3. Field controls
          2. Page Part controls
            1. Page control triggers
          3. Bound and Unbound Pages
        7. WDTU Page Enhancement – part 2
        8. Page Actions
          1. Page Action Types and Subtypes
          2. Action Groups
          3. Action properties
          4. Navigation Pane Button actions
          5. Actions Summary
        9. Learning more
          1. UX (User Experience) Guidelines
          2. Creative plagiarism and patterns
          3. Experimenting on our own
          4. Experimentation
        10. Summary
        11. Review questions
      14. 5. Queries and Reports
        1. Queries
          1. Building a simple Query object
          2. Query and Query component properties
            1. Query properties
            2. The DataItem properties
            3. Column properties
        2. Reports
          1. What is a report?
          2. Four NAV report designers
          3. NAV report types
            1. Report types summarized
            2. Report naming
        3. Report components – overview
          1. Report structure
            1. Report data overview
            2. Report Layout overview
        4. Report data flow
        5. Report components – detail
          1. C/SIDE Report properties
          2. SQL Server Report Builder – Report properties
          3. Report triggers
          4. Request Page Properties
          5. Request page triggers
          6. DataItem properties
          7. DataItem triggers
        6. Creating a Report in NAV 2015
          1. Learn by experimentation
          2. Report building – phase 1
          3. Report building – phase 2
          4. Report building – phase 3
            1. Modifying an existing report with Report Designer or Word
            2. Runtime rendering
            3. Inheritance
          5. Interactive report capabilities
            1. Interactive sorting
            2. Interactive visible/not visible
          6. Request page
            1. Add a Request Page option
          7. Processing-Only reports
          8. Creative report plagiarism and patterns
        7. Summary
        8. Review questions
      15. 6. Introduction to C/SIDE and C/AL
        1. Understanding C/SIDE
          1. Object Designer
            1. Starting a new object
              1. Accessing the Table Designer
              2. Accessing the Page Designer
              3. Accessing the Report Dataset Designer
              4. Accessing the Codeunit Designer
            2. Query Designer
            3. XMLport Designer
            4. MenuSuite Designer
            5. Object Designer Navigation
              1. Exporting objects
            6. Importing objects
              1. Import Table object changes
          2. Text objects
            1. Some useful practices
              1. Changing data definitions
              2. Saving and compiling
            2. Some C/AL naming conventions
            3. Variables
              1. C/AL Globals
              2. C/AL Locals
                1. Function local identifiers
                2. Other local identifiers
              3. Special working storage variables
                1. Temporary tables
                2. Arrays
                3. Initialization
                4. System-defined variables
          3. C/SIDE programming
            1. Non-modifiable functions
            2. Modifiable functions
            3. Custom functions
              1. Create a function
        2. C/AL syntax
          1. Assignment and punctuation
          2. Expressions
            1. Operators
              1. Arithmetic operators and functions
              2. Boolean operators
              3. Relational operators and functions
              4. Precedence of operators
          3. Frequently used C/AL functions
            1. The MESSAGE function
            2. The ERROR function
            3. The CONFIRM function
            4. The STRMENU function
            5. Record functions
              1. The SETCURRENTKEY function
              2. The SETRANGE function
              3. The SETFILTER function
              4. GET function
            6. FIND functions
              1. FIND ([Which]) options and the SQL Server alternates
          4. Conditional statements
            1. The BEGIN–END compound statement
            2. The IF–THEN–ELSE statement
          5. Indenting code
        3. Some simple coding modifications
          1. Adding field validation to a table
          2. Adding code to a report
          3. Lay out the new Report Heading
          4. Save and test
          5. Lookup Related table data
          6. Layout the new report body
            1. Save and test
            2. Handling User-entered report options
            3. Defining the Request Page
        4. Finishing the processing code
          1. Test the completed report
          2. Output to Excel
        5. Summary
        6. Review questions
      16. 7. Intermediate C/AL
        1. C/AL Symbol Menu
        2. Internal documentation
        3. Validation functions
          1. TESTFIELD
          2. FIELDERROR
          3. INIT
          4. VALIDATE
        4. Date and Time functions
          1. TODAY, TIME, and CURRENTDATETIME functions
          2. WORKDATE function
          3. DATE2DMY function
          4. DATE2DWY function
          5. DMY2DATE and DWY2DATE functions
          6. CALCDATE function
        5. Data conversion and formatting functions
          1. ROUND
          2. FORMAT function
          3. EVALUATE function
        6. FlowField and SumIndexField functions
          1. CALCFIELDS function
          2. SETAUTOCALCFIELDS function
          3. CALCSUMS function
            1. CALCFIELDS and CALCSUMS comparison
        7. Flow control
          1. REPEAT-UNTIL
          2. WHILE-DO
          3. FOR-TO or FOR-DOWNTO
          4. CASE-ELSE statement
          5. WITH-DO statement
          6. QUIT, BREAK, EXIT, and SKIP functions
            1. QUIT function
            2. BREAK function
            3. EXIT function
            4. SKIP function
        8. Input and Output functions
          1. NEXT function with FIND or FINDSET
          2. INSERT function
          3. MODIFY function
            1. Rec and xRec
          4. DELETE function
          5. MODIFYALL function
          6. DELETEALL function
        9. Filtering
          1. SETFILTER function
          2. COPYFILTER and COPYFILTERS functions
          3. GETFILTER and GETFILTERS functions
          4. FILTERGROUP function
          5. MARK function
          6. CLEARMARKS function
          7. MARKEDONLY function
          8. RESET function
        10. InterObject communication
          1. Communication via data
          2. Communication through function parameters
          3. Communication via object calls
        11. Enhancing the WDTU application
          1. Modifying Table Fields
          2. Add Validation logic
            1. Playlist Header Validations
          3. Creating the Playlist Subform page
            1. Playlist Line Validations
          4. Creating a function for our Factbox
          5. Creating a Factbox page
        12. Summary
        13. Review questions
      17. 8. Advanced NAV Development Tools
        1. NAV process flow
          1. Initial setup and data preparation
          2. Transaction entry
          3. Testing and posting the Journal batch
          4. Utilizing and maintaining the data
          5. Data maintenance
        2. Role Center pages
          1. The Role Center structure
            1. The Role Center activities page
            2. Cue Groups and Cues
            3. Cue source table
            4. Cue Group Actions
          2. System Part
          3. Page Parts
            1. Page Parts not visible
            2. Page Part Charts
            3. Page Parts for user data
          4. The Navigation Pane and Action menus
            1. Action Designer
            2. Create a WDTU Role Center Ribbon
              1. Promoted Actions Categories
              2. Action Groups
              3. Configuration/Personalization
            3. The Navigation Pane
              1. The Navigation Home Button
              2. The Navigation Departments Button
              3. Other Navigation Buttons
        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. The Element or Attribute
              1. NodeType of Element
              2. NodeType of Attribute
            6. XMLport line triggers
              1. DataType as Text
              2. DataType as Table
              3. DataType as Field
            7. XMLport Request Page
        4. Web services
          1. Exposing a web service
          2. Publishing a web service
          3. Enabling web services
          4. Determining what was published
          5. XMLport – a web services integration example for WDTU
        5. Summary
        6. Review questions
      18. 9. Successful Conclusions
        1. Creating new C/AL routines
          1. Callable functions
            1. Codeunit 358 – Date FilterCalc
            2. Codeunit 359 – Period Form Management
            3. Codeunit 365 – Format Address
            4. Codeunit 396 – NoSeriesManagement
            5. Function models to review and use
          2. Management codeunits
        2. Multi-language system
        3. Multi-currency system
        4. Navigate
          1. Modifying for Navigate
        5. Debugging in NAV 2015
          1. Text Exports of Objects
          2. Dialog function debugging techniques
            1. Debugging with MESSAGE and CONFIRM
            2. Debugging with DIALOG
            3. Debugging with text output
            4. Debugging with ERROR
          3. The NAV 2015 Debugger
            1. Activating the Debugger
            2. Attaching the Debugger to a Session
            3. Creating Break Events
            4. The Debugger window
            5. Changing code while debugging
        6. C/SIDE Test-driven development
        7. Other Interfaces
          1. Automation Controller
          2. Linked Data Sources
        8. NAV Application Server (NAS)
        9. Client Add-ins
          1. Client Add-in construction
          2. WDTU Client Add-in
          3. Client Add-in comments
        10. Customizing Help
        11. NAV development projects – general guidance
          1. Knowledge is the key
          2. Data-focused design
            1. Defining the needed data views
            2. Designing the data tables
            3. Designing the user data access interface
            4. Designing the data validation
            5. Data design review and revision
          3. Designing the posting processes
          4. Designing the supporting processes
          5. Double-check everything
        12. Design for efficiency
          1. Disk I/O
          2. Locking
        13. Updating and upgrading
          1. Design for updating
            1. Customization project recommendations
              1. One change at a time
            2. Testing
              1. Database testing approaches
              2. Testing in production
              3. Using a testing database
              4. Testing techniques
            3. Deliverables
            4. Finishing the project
          2. Plan for upgrading
            1. Benefits of upgrading
          3. Coding considerations
            1. Good documentation
            2. Low-impact coding
        14. Supporting material
        15. Summary
        16. Review questions
      19. A. Review Answers
        1. Chapter 1, An Introduction to NAV 2015
        2. Chapter 2, Tables
        3. Chapter 3, Data Types and Fields
        4. Chapter 4, Pages – The Interactive Interface
        5. Chapter 5, Queries and Reports
        6. Chapter 6, Introduction to C/SIDE and C/AL
        7. Chapter 7, Intermediate C/AL
        8. Chapter 8, Advanced NAV Development Tools
        9. Chapter 9, Successful Conclusions
      20. Index