Book Image

Mastering Microsoft Dynamics NAV 2016

By : Rabindra Sah
Book Image

Mastering Microsoft Dynamics NAV 2016

By: Rabindra Sah

Overview of this book

The book begins by giving you a brief introduction to setting up your NAV environment and shows you how to install and configure it according to your requirements. You will then dive deep into the latest design patterns, network architecture, and topologies. We will show you how you can integrate NAV with the Microsoft platform, and secure your deployment by managing roles and permissions. Moving on, we will explain how to monitor and manage server instances using the Administration tool. We’ll discuss how you can take advantage of the expanded extensibility and connectivity capabilities for a tighter integration with the cloud as well as handheld devices. Then, we’ll show you how you can make use of the PowerBI capabilities that have been built into Dynamics NAV. By the end of the book, you will be confident in developing and administering a Dynamics NAV implementation that will leverage all of the new features.
Table of Contents (19 chapters)
Mastering Microsoft Dynamics NAV 2016
Credits
About the Author
About the Reviewer
www.PacktPub.com
Customer Feedback
Preface

Considerations while coding


All the considerations for coding cannot be covered in this chapter. I have tried to cover some of the interesting and most useful topics in this chapter.

The Try function

The Try function is the latest addition to the Dynamics NAV system. It is directly taken from the C# language and serves the purpose of catching the exceptions that were impossible to catch in previous versions. The first thing that a programmer wants in any language is to catch the exception because in other programming forms, it is the first thing that we write. To create a Try function, add a function in the C/AL code of an object. Then, set the TryFunction property to Yes.

A Try function has the following restrictions:

  • In test and upgrade code units, you can only use a Try function on a normal function type

  • The Try function cannot have a user-defined return value

Note

The details on how to create the Try function and implement it in your code are explained inChapter 3, The C/AL and VB Programming...