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

Editor scripts


Microsoft provides a simple how-to on adding a script to the code editor at http://msdn.microsoft.com/en-us/library/aa676080.aspx. In the following sections, we will create some scripts that save us time while writing code.

To add an editor script, we modify the EditorScripts class. Looking at the classDeclaration, we see this comment:

// This is a framework class. Customizing this class may cause problems with future upgrades to the software.

In this case, the warning means that Microsoft may change this class or the technology in future versions, and this is likely given the direction they are going in with rationalizing development tools. We will therefore proceed under the knowledge that we may need to remove this code when upgrading to the next release.

The scripts context menu is opened while in the code editor, using the scripts icon or by selecting Scripts from the right-click menu. This is shown here:

Now look at the methods in the EditorScripts class. You can see from the following screenshot that the method name actually creates this menu structure: