O'Reilly logo

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Extending Microsoft Dynamics NAV 2016 Cookbook

Book Description

Make the most of your NAV deployment by extending and customizing it with a variety of expert tools

About This Book

  • Extend Dynamics in a cost-effective manner by using tools that are ready at your disposal
  • Solve common business problems with the valuable features and flexibility of Dynamics NAV
  • Follow practical and easy-to-grasp examples, illustrations, and coding to make the most out of Dynamics NAV in your organisation

Who This Book Is For

This book is for Dynamics NAV developers and administrators who have a good knowledge level and understanding of Dynamics NAV application development and administration.

What You Will Learn

  • Develop a module in Dynamics NAV using C/AL
  • Build relationships with COM technologies
  • Develop and integrate COM with Dynamics NAV 2016
  • Call the framework members from C/AL
  • Develop an event in the .NET framework and see how to subscribe to it using C/AL
  • Automate the deployment into Dynamics NAV
  • Develop Windows Client Control add-Ins
  • Deploy your resource automatically from Visual Studio
  • Install and Configure Windows Client Control add-Ins
  • Integrate Dynamics NAV with Sharepoint

In Detail

Microsoft Dynamics NAV is an enterprise resource planning (ERP) software suite for organizations. The system offers specialized functionality for manufacturing, distribution, government, retail, and other industries. Its integrated development environment enables customizations with minimal disruption to business processes.

The book starts explaining the new features of Dynamics NAV along with how to create and modify a simple module. Moving on, you will learn the importance of thinking beyond the boundaries of C/AL development and the possibilities opened by with it. Next, you will get to know how COM can be used to extend the functionalities of Dynamics NAV.

You'll find out how to extend the Dynamics NAV 2016 version using .NET interoperability and will see the steps required to subscribe to .NET events in order to extend Dynamics NAV. Finally, you'll see the cmdlets available to manage extension packages.

By the end of the book, you will have the knowledge needed to become more efficient in selecting the extending methods, developing and deploying them to the Dynamics NAV, and practicing the best practices.

Style and approach

The book follows a practical recipe-based approach focusing on real-world scenarios and giving you all the information you need to build a strong Dynamics NAV implementation.

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 code file.

Table of Contents

  1. Extending Microsoft Dynamics NAV 2016 Cookbook
    1. Extending Microsoft Dynamics NAV 2016 Cookbook
    2. Credits
    3. About the Author
    4. About the Reviewer
    5. www.PacktPub.com
      1. Why subscribe?
    6. Customer Feedback
    7. Preface
      1. What this book covers
      2. What you need for this book
      3. Who this book is for
      4. Sections
        1. Getting ready
        2. How to do it…
        3. How it works…
        4. There's more…
        5. See also
      5. Conventions
      6. Reader feedback
      7. Customer support
        1. Downloading the example code
        2. Errata
        3. Piracy
        4. Questions
    8. 1. Writing Basic C/AL Code
      1. Introduction
      2. Installing NAV Development Environment
        1. Getting ready
        2. How to do it...
        3. How it works...
      3. Application object triggers
        1. How to do it...
        2. How it works...
      4. NAV Development Environment - C/SIDE
        1. How to do it...
        2. How it works...
      5. Compiling objects and error handling
        1. How to do it...
        2. How it works...
      6. Importing and exporting application objects
        1. How to do it...
        2. How it works...
      7. Basic C/AL programming
        1. How to do it...
        2. How it works...
      8. Accessing the database in C/AL
        1. How to do it...
        2. How it works...
      9. Configuring NAV Server
        1. Getting ready
        2. How to do it...
        3. How it works...
          1. Creating a NAV user account
          2. Generating a self-signed certificate
          3. Obtaining the certificate thumbprint
          4. Changing the server configuration
      10. Configuring web server
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. There's more...
        5. See also
    9. 2. Advanced C/AL Development
      1. Introduction
      2. Creating custom tables
        1. How to do it...
        2. How it works...
      3. Understanding database triggers
        1. How to do it...
        2. How it works...
      4. Implementing a user interface with pages
        1. How to do it...
        2. How it works...
      5. Linking datasources in subpages
        1. How to do it...
        2. How it works...
      6. Working with page triggers
        1. How to do it...
        2. How it works...
      7. Presenting related data in FactBoxes
        1. How to do it...
        2. How it works...
      8. Designing reusable code
        1. How to do it...
        2. How it works...
        3. See also
      9. Accessing temporary tables
        1. How to do it...
        2. How it works...
        3. See also
      10. Role-Tailored client and role centers
        1. How to do it...
        2. How it works...
      11. Assigning role centers to user profiles
        1. Getting ready
        2. How to do it...
        3. How it works...
      12. Simplifying data access with queries
        1. How to do it...
        2. How it works...
      13. Improving performance with indexes
        1. How to do it...
        2. How it works...
      14. Linking datasources with advanced queries
        1. How to do it...
        2. How it works...
      15. Exchanging data with XMLPort objects
        1. How to do it...
        2. How it works...
      16. Designing the user menu
        1. How to do it...
        2. How it works...
      17. Referencing records and fields via RecordRef and FieldRef
        1. How to do it...
        2. How it works...
      18. Working with single instance codeunits
        1. How to do it...
        2. How it works...
      19. Running tasks in background sessions
        1. How to do it...
        2. How it works...
        3. See also
    10. 3. Reporting and Data Analysis
      1. Introduction
      2. Designing reports in Visual Studio
        1. How to do it...
        2. How it works...
      3. Developing Word layout for RDLC reports
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. There's more...
      4. Writing C/AL code in a report
        1. Getting ready
        2. How to do it...
        3. How it works...
      5. Designing the report request page
        1. Getting ready
        2. How to do it...
        3. How it works...
      6. Writing RDLC code in a report
        1. Getting ready
        2. How to do it...
        3. How it works...
      7. Using built-in expressions in the report layout designer
        1. Getting ready
        2. How to do it...
        3. How it works...
      8. Including user interaction in reports
        1. Getting ready
        2. How to do it...
        3. How it works...
      9. Updating NAV data with the Excel add-in
        1. Getting ready
        2. How to do it...
        3. How it works...
      10. Retrieving data from NAV with Power Query
        1. Getting ready
        2. How to do it...
        3. How it works...
      11. Creating pivot tables with Power Query
        1. Getting ready
        2. How to do it...
      12. Analyzing data with Power BI
        1. Getting ready
        2. How to do it...
        3. How it works...
      13. Data hierarchies in Power BI reports
        1. How to do it...
      14. Statistical data analysis in Power BI with R
        1. Getting ready
        2. How to do it...
        3. How it works...
      15. Sales forecast in Power BI with R
        1. Getting ready
        2. How to do it...
        3. How it works...
      16. Designing server-side reports in SQL Server Reporting Studio
        1. Getting ready
        2. How to do it...
        3. How it works...
        4. There's more...
    11. 4. .NET Interoperability in C/AL
      1. Introduction
      2. Using .NET assemblies in C/AL
        1. How to do it...
        2. How it works...
      3. Understanding static classes and methods
        1. How to do it...
        2. How it works...
      4. Developing server-side extensions
        1. How to do it...
        2. How it works...
      5. Developing client-side extensions
        1. How to do it...
        2. How it works...
      6. Working with generics in C/AL
        1. How to do it...
        2. How it works...
      7. Working with interfaces
        1. How to do it...
        2. How it works...
      8. Accessing collections with the FOREACH statement
        1. How to do it...
        2. How it works...
      9. Working with .NET strings and arrays in C/AL
        1. How to do it...
        2. How it works...
      10. Invoking .NET methods via reflection
        1. How to do it...
        2. How it works...
      11. Handling exceptions with try functions
        1. How to do it...
        2. How it works...
      12. Handling .Net events in C/AL
        1. How to do it...
        2. How it works...
      13. Developing your own .NET class
        1. How to do it...
        2. How it works...
      14. Starting processes in separate threads
        1. Getting ready
        2. How to do it...
        3. How it works...
    12. 5. Extending C/AL with COM Components
      1. Introduction
      2. Using COM type libraries in C/AL
        1. How to do it...
        2. How it works...
      3. Mapping COM datatypes to C/AL
        1. How to do it...
        2. How it works...
      4. Disposing of COM objects
        1. How to do it...
        2. How it works...
      5. Working with the Variant datatype
        1. How to do it...
        2. How it works...
      6. Sending data to the Excel automation server
        1. How to do it....
        2. How it works...
      7. Creating a Word document using automation objects
        1. How to do it...
        2. How it works...
      8. Creating and registering a COM component that can be used in NAV
        1. How to do it...
        2. How it works...
    13. 6. SharePoint Integration
      1. Introduction
      2. Creating a developer SharePoint site
        1. How to do it...
      3. Developing NAV apps for SharePoint
        1. Getting ready
        2. How to do it...
        3. How it works...
      4. Embedding NAV page objects in site pages
        1. Getting ready
        2. How to do it...
        3. How it works...
      5. Publishing NAV reports in SharePoint
        1. How to do it...
      6. Deploying applications on SharePoint
        1. How to do it...
        2. How it works...
      7. Configuring user permissions
        1. How to do it...
        2. How it works...
    14. 7. Control Add-ins
      1. Introduction
      2. Developing a control add-in
        1. How to do it...
        2. How it works...
      3. Signing the control add-in assembly
        1. How to do it...
        2. How it works...
      4. Registering and embedding a control add-in
        1. How to do it...
        2. How it works...
      5. JavaScript in web, phone, and tablet clients
        1. Getting ready
        2. How to do it...
        3. How it works...
      6. Installing and using JavaScript control add-ins
        1. How to do it...
        2. How it works...
      7. Sending events from add-ins to NAV server
        1. Getting ready
        2. How to do it...
        3. How it works...
      8. Linking add-ins with the database
        1. How to do it...
        2. How it works...
      9. Exchanging data with add-ins
        1. How to do it...
        2. How it works...
    15. 8. Web Services
      1. Introduction
      2. Publishing a SOAP web service
        1. How to do it...
      3. Calling object methods in SOAP web services
        1. How to do it...
        2. How it works...
      4. Exposing and consuming OData web services
        1. How to do it...
        2. How it works...
      5. Querying NAV OData web services with LINQ
        1. How to do it...
        2. How it works...
      6. Updating NAV data through web services
        1. Getting ready
        2. How to do it...
        3. How it works...
      7. Securing access to web services
        1. Getting ready
        2. How to do it...
        3. How it works...
      8. Consuming the NAV web service from Java
        1. Getting ready
        2. How to do it...
        3. How it works...
    16. 9. Events and Extension Packages
      1. Introduction
      2. Subscribing to business and integration events
        1. How to do it...
        2. How it works...
      3. Subscribing to global events
        1. How to do it...
        2. How it works...
      4. Using database trigger events
        1. How to do it...
        2. How it works...
      5. Extending UI with page trigger events
        1. How to do it...
        2. How it works...
      6. Creating custom events
        1. How to do it...
        2. How it works...
      7. Subscribing to events in runtime
        1. How to do it...
      8. Developing an extension
        1. Getting ready
        2. How to do it...
        3. How it works...
      9. Installing an extension
        1. Getting ready
        2. How to do it...
    17. 10. PowerShell
      1. Introduction
      2. Managing the database
        1. How to do it...
        2. How it works...
      3. Managing users and user permissions
        1. How to do it...
        2. How it works...
      4. Managing companies
        1. How to do it...
      5. Administering NAV services with PowerShell
        1. How to do it...
        2. How it works...
      6. Handling application objects
        1. How to do it...
        2. How it works...
      7. Merging application objects
        1. How to do it...
        2. How it works...