Book Image

Extending Microsoft Dynamics NAV 2016 Cookbook

By : Alexander Drogin
Book Image

Extending Microsoft Dynamics NAV 2016 Cookbook

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. 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.
Table of Contents (17 chapters)
Extending Microsoft Dynamics NAV 2016 Cookbook
Credits
About the Author
About the Reviewer
www.PacktPub.com
Customer Feedback
Preface

Working with generics in C/AL


Generic classes and methods in .NET Framework are a powerful tool allowing more extensive code reusability, while keeping the code type-safe. Generics enable the code to defer type specification until the moment of instantiation of the generic class.

To use generics in C/AL, you can declare variables of the DotNet type and bind them to one of the classes from the System.Collections.Generic namespace.

How to do it...

In this recipe, we will use a generic List class to find an item in a collection with the closest match to a provided search pattern.

  1. Create a blank page in the object designer. No page wizard is required, since the page will not present any database controls and is not bound to any table.

  2. In the page designer, enter a name for the default ContentArea container and insert a Field element under the container.

  3. Declare a global Text variable SearchText. Enter SearchText in the SourceExpr property of the text control.

  4. Create a C/AL Search function. The function...