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 page triggers


Page triggers are used to change the way page data is presented to the user. In this recipe, we will use triggers to calculate a value that will be displayed in the page "on-the-fly", when a record in retrieved from the database. Besides, trigger code will update the style of text boxes depending on the data displayed in them.

How to do it...

To illustrate the data presentation in a page, we write page trigger code highlighting expired certificates to draw user's attention to entries demanding immediate action.

  1. Open the page 50010 Item Certificate Card in page designer. Declare a global variable ExpirationDate of the Date type.

  2. Insert a new field in the General group, just below the field Issued Date. Set SourceExpr = ExpirationDate to make the ExpirationDate variable as the data source for the new field.

  3. Open the C/AL Code page. Declare a function GetCertificateExpirationDate.

  4. Open function parameters and add one parameter:

    Name

    DataType

    Length

    CertificateNo...