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)

Function parameters and return values

In the previous example, we simply call a function that displays a hardcoded message. But if we want to make the function more flexible and able to show different text, we must pass a text parameter into the function. Function parameters in NAV are declared in the same way as functions themselves. A line of code representing the function declaration in the code editor is not editable. Parameters are described in a separate editor window instead. In this section, we will see how to pass parameters to a function and return a resulting value from it.

How to add parameters to a function

Let's modify the codeunit so that the message to be shown to the user will be passed in the function...