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

Extending UI with page trigger events


Page trigger events provide a way to extend the functionality of UI actions on pages. As with other event types, the main purpose of an event is to allow developers to add custom code to base application objects without intrusion into the code.

Objects subscribing to a page trigger event are invoked when the user runs an action in the page, after the C/AL code located directly in the page, is executed.

How to do it...

This recipe shows how to use a page trigger event to assign a user account to a sales order on the Release action.

  1. Run the NAV development environment. In the Codeunit Designer, create a new codeunit 50903 Page Trigger Event.

  2. In C/AL Globals, declare a function OnReleaseSalesOrderAssignUserID.

  3. Open the function properties. In the Event property, set the value to Subscriber. In the current example, EventPublisherObject is Page 42 Sales Order. You can either choose it from the lookup list or just type page 42 in the property value.

  4. Lookup the list...