Book Image

Microsoft Dynamics NAV Development Quick Start Guide

By : Alexander Drogin
Book Image

Microsoft Dynamics NAV Development Quick Start Guide

By: Alexander Drogin

Overview of this book

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. This book gets you started with its integrated development environment for solving problems by customizing business processes. This book introduces the NAV development environment – C/SIDE. It gives an overview of the internal system language and the most essential development tools. The book will enable the reader to customize and extend NAV functionality with C/AL code, design a user interface through pages, create role centers, and build advanced reports in Microsoft Visual Studio. By the end of the book, you will have learned how to extend the NAV data model, how to write and debug custom code, and how to exchange data with external applications.
Table of Contents (10 chapters)

Manual event subscription

In all event subscribers we created in this chapter, subscription was activated as soon as the Subscriber function was saved and compiled. But this is not necessary; subscription can be started manually by C/AL code. Now, we will see how to activate subscription on demand.

This example will subscribe to a custom event raised on the creation of a general journal line from a customer payment record. We will use it to show a progress bar window with the number of processed lines. Event subscription will help separate the user interface (progress window) from the line-processing code, and enable the window when needed simply by activating the subscription.

Journal lines are created in codeunit 50504 Customer Payments Mgt. by the CreatePaymentJournalLines function, which is given as follows:

PROCEDURE CreatePaymentJournalLines(VAR CustomerPaymentFilter : Record...