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)

Text constants

Text constants in C/AL are declared the same way as variables: through the C/AL Locals or C/AL Globals editors. In most cases, constants are declared as globals. It is good practice to avoid global variables when a local one is sufficient, but this is not the case with constants. A global variable often causes specific bugs; since it is available in any part of the code, and any function can change its value, it becomes very difficult to track the value of the variable while the volume of the code grows. This is not a problem with constants, because once assigned, the value of a constant cannot be changed.

With this in mind, in all code samples where text constants are involved, we will declare them as globals. A typical application of text constants is UI messages: process information or error notifications. And having a constant in the global scope is handy when...