Book Image

Mastering Microsoft Dynamics AX 2012 R3 Programming

By : Simon Buxton, Mat Fergusson
Book Image

Mastering Microsoft Dynamics AX 2012 R3 Programming

By: Simon Buxton, Mat Fergusson

Overview of this book

<p>Due to its interesting capabilities such as finance and supply chain management, business intelligence and reporting, project management, and so on, Microsoft Dynamics is one of the most widely used solutions adopted by many organizations across the globe. This book is a step-by-step tutorial that covers elements from the initial design through to development. Each concept is fully explained and demonstrated by the creation of a real-world project. You will learn some really useful, advanced development techniques such as extending your code with metadata and exception handling.</p> <p>This book is an invaluable tutorial if you are moving from another ERP system or language, or if you are a technical consultant with a desire to create efficient functional designs and business solutions.</p>
Table of Contents (21 chapters)
Mastering Microsoft Dynamics AX 2012 R3 Programming
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Index

Hooking into standard AX logic using event handling


Event handling is a new and welcome feature in AX from version 2012 onwards. One of its biggest gains is that it helps reduce the footprint on standard software (or that provided by an ISV or a partner). The footprint is one of the biggest concerns when minimizing the impact of future updates and upgrades.

The scenario we are describing is where we subscribe to an event (such as a table's delete method) so that it will call a method that handles the event. Although we add this subscription to a standard object in the AOT, the standard object is not modified. AX stores only the subscription definition. It is represented against the standard code, but this is only to help us intuitively create and manage event subscriptions.

The functionality we are going to provide is as follows:

When scheduling an appointment in transport management, the system has to associate the tractor and trailer with our fleet management system, if it exists. No lookup...