Introduction

Microsoft Dynamics AX 2012 represents a new generation of enterprise resource planning (ERP) software. With over 1,000 new features and prebuilt industry capabilities for manufacturing, distribution, services, retail, and public sector, Microsoft Dynamics AX 2012 provides a robust platform for developers to deliver specialized functionality more efficiently to the industries that they support.

Microsoft Dynamics AX 2012 is a truly global solution, able to scale with any business as it grows. It is simple enough to deploy for a single business unit in a single country/region, yet robust enough to support the unique requirements for business systems in 36 countries/regions—all from a single-instance deployment of the software.

For this version of Microsoft Dynamics AX, the entire codebase was analyzed and, where necessary, reengineered, so that the application is built more holistically around a set of unified principles. As Microsoft Technical Fellow Mike Ehrenberg explains:

The heart of Microsoft Dynamics AX 2012 is a set of unified, natural models that let you see, measure, and change your business. In developing this release, every application concept involved in representing the business in software was reexamined. In each case, limitations that forced workarounds and compromises in older ERP products were lifted, and new capabilities were added to provide an even richer software representation of a business and its structure, processes, and policies. Unified, natural Microsoft Dynamics AX 2012 models make modeling simple businesses fast and easy and yet still provide the richness and flexibility to represent the most complex organizations.

Early adopters have also weighed in on the benefits of Microsoft Dynamics AX 2012:

Microsoft Dynamics AX 2012 allows us to collaborate within our organization and with our constituents … using built-in controls and fund/encumbrance accounting capabilities to ensure compliance with Public Sector requirements … and using out-of the-box Business Analytics and Intelligence … so executives can make effective decisions in real time.

Mike Bailey

Director of Finance and Information Services

City of Redmond (WA)

With the latest release, developing for and customizing Microsoft Dynamics AX will be easier than ever. Developers will be able to work with X++ directly from within Microsoft Visual Studio and enjoy more sophisticated features in the X++ editor, for example. Also, the release includes more prebuilt interoperability with Microsoft SharePoint Server and SQL Server Reporting Services, so that developers spend less time on mundane work when setting up customer systems.

Guido Van de Velde

Director of MECOMSTM

Ferranti Computer Systems

Microsoft Dynamics AX 2012 is substantially different from its predecessor, which can mean a steep learning curve for developers and system implementers who have worked with previous versions. However, by providing a broad overview of the architectural changes, new technologies, and tools for this release, the authors of Inside Microsoft Dynamics AX 2012 have created a resource that will help reduce the time that it takes for developers to become productive with this version of Microsoft Dynamics AX.

The history of Microsoft Dynamics AX

Historically, Microsoft Dynamics AX encompasses more than 25 years of experience in business application innovation and developer productivity. Microsoft acquired the predecessor of Microsoft Dynamics AX, called Axapta, in 2002, with its purchase of the Danish company Navision A/S. The success of the product has spurred an increasing commitment of research and development resources, which allows Microsoft Dynamics AX to grow and strengthen its offering continuously.

The development team that created Microsoft Dynamics AX 2012 consists of three large teams, two that are based in the United States (Fargo, North Dakota, and Redmond, Washington) and one that is based in Denmark (Copenhagen). The Fargo team focuses on finance and human resources (HR), the Redmond team concentrates on project management and accounting and customer relationship management (CRM), and the Copenhagen team delivers supply chain management (SCM). In addition, a framework team develops infrastructure components, and a worldwide distributed team localizes the Microsoft Dynamics AX features to meet national regulations or local differences in business practices in numerous languages and markets around the world.

To clarify a few aspects of the origins of Microsoft Dynamics AX, the authors contacted people who participated in the early stages of the Microsoft Dynamics AX development cycle. The first question we asked was, “How was the idea of using X++ as the programming language for Microsoft Dynamics AX conceived?”

We had been working with an upgraded version of XAL for a while called OO XAL back in 1996/1997. At some point in time, we stopped and reviewed our approach and looked at other new languages like Java. After working one long night, I decided that our approach had to change to align with the latest trends in programming languages, and we started with X++.

Erik Damgaard

Cofounder of Damgaard Data

Of course, the developers had several perspectives on this breakthrough event.

One morning when we came to work, nothing was working. Later in the morning, we realized that we had changed programming languages! But we did not have any tools, so for months we were programming in Notepad without compiler or editor support.

Anonymous developer

Many hypotheses exist regarding the origin of the original product name, Axapta. Axapta was a constructed name, and the only requirement was that the letter X be included, to mark the association with its predecessor, XAL. The X association carries over in the name Microsoft Dynamics AX.

Who should read this book

This book explores the technology and development tools in Microsoft Dynamics AX 2012. It is designed to help new and existing Microsoft Dynamics AX developers by providing holistic and in-depth information about developing for Microsoft Dynamics AX 2012—information that may not be available from other resources, such as SDK documentation, blogs, or forums. It aids developers who are either customizing Microsoft Dynamics AX 2012 for a specific implementation or building modules or applications that blend seamlessly with Microsoft Dynamics AX 2012. System implementers and consultants will also find much of the information useful.

Assumptions

To get full value from this book, you should have knowledge of common object-oriented concepts from languages such as C++, C#, and Java. You should also have knowledge of relational database concepts. Knowledge of Structured Query Language (SQL) and Microsoft .NET technology are also advantageous. Transact-SQL statements are used to perform relational database tasks, such as data updates and data retrieval.

Who should not read this book

This book is not aimed at those who install, upgrade, or deploy Microsoft Dynamics AX 2012. It is also beyond the scope of this book to include details about the sizing of production environments. For more information about these topics, refer to the extensive installation and implementation documentation that is supplied with the product or available on TechNet, MSDN, and other websites.

The book also does not provide instructions for those who configure parameter options within Microsoft Dynamics AX 2012 or the business users who use the application in their day-to-day work. For assistance with these activities, refer to the help that is shipped with the product and available on TechNet at http://technet.microsoft.com/en-us/library/gg852966.aspx.

Organization of this book

Although Inside Microsoft Dynamics AX 2012 does not provide exhaustive coverage of every feature in Microsoft Dynamics AX 2012, it does offer a broad view that will benefit developers as they develop for the product.

This book is divided into three sections, each of which focuses on Microsoft Dynamics AX 2012 from a different angle. Part I, provides an overview of the Microsoft Dynamics AX 2012 architecture that has been written with developers in mind. The chapters in Part I also provide a tour of the internal Microsoft Dynamics AX 2012 development environment to help new developers familiarize themselves with the designers and tools that they will use to implement their customizations, extensions, and integrations.

Part II, provides the information that developers need in order to customize and extend Microsoft Dynamics AX 2012. In addition to explanations of the features, many chapters include examples, some of which are available as downloadable files that can help you learn how to code for Microsoft Dynamics AX. For information about how to access these files, see the Code samples section, later in this introduction.

Part III, is largely devoted to illustrating how developers can use the underlying foundation of the Microsoft Dynamics AX 2012 application frameworks to develop their solutions, with a focus on the database layer, system and application frameworks, reflection, and models.

Conventions and features in this book

This book presents information using the following conventions, which are designed to make the information readable and easy to follow.

  • Application Object Tree (AOT) paths use backslashes to separate nodes, such as FormsAccountingDistributionMethods.

  • The names of methods, functions, properties and property values, fields, and nodes appear in italics.

  • Registry keys and T-SQL commands appear in capital letters.

  • User interface (UI) paths use angle brackets to indicate actions—for example, “On the File menu, point to Tools > Options.”

  • Boxed elements with labels such as “Note” provide additional information or alternative methods for completing a step successfully.

  • Text that you type (apart from code blocks) appears in bold.

  • A plus sign (+) between two key names means that you must press those keys at the same time. For example, “Press Alt+Tab” means that you hold down the Alt key while you press the Tab key.

System requirements

To work with sample code, you must have the RTM version of Microsoft Dynamics AX 2012 installed. For information about the system requirements for installing Microsoft Dynamics AX 2012, see the Microsoft Dynamics AX 2012 Installation Guide at http://www.microsoft.com/en-us/download/details.aspx?id=12687.

You must also have an Internet connection to download the sample files that are provided as supplements to many of the chapters.

Note

Some of the features described in this book, such as data partitioning and the EP Chart Control, apply only to the Microsoft Dynamics AX 2012 R2. That is noted where those features are discussed.

Code samples

Most of the chapters in this book include code examples that let you interactively try out the new material presented in the main text. You can download the example code from the following page:

http://go.microsoft.com/FWLink/?Linkid=263524

Follow the instructions to download the InsideDynaAX2012_667105_CompanionContent.zip file.

Installing the code samples

Follow these steps to install the code samples on your computer:

  1. Unzip the InsideDynaAX2012_667105_CompanionContent.zip file that you downloaded from the book’s website.

  2. If prompted, review the displayed end user license agreement. If you accept the terms, select the accept option, and then click Next.

Note

If the license agreement doesn’t appear, you can access it from the same webpage from which you downloaded the InsideDynaAX2012_667105_CompanionContent.zip file.

Using the code samples

The code examples referenced in each chapter are provided as both .xpo files that you can import into Microsoft Dynamics AX and Visual Studio projects that you can open through the corresponding .csproj files. Many of these examples are incomplete, and you cannot import and run them successfully without following the steps indicated in the associated chapter.

Acknowledgments

We want to thank all the people who assisted us in bringing this book to press. We apologize for anyone whose name we missed.

Microsoft Dynamics product team

Special thanks go to the following colleagues, whom we’re fortunate to work with.

Margaret Sherman, who pitched the book to Microsoft Press, provided us with training in how to use templates and style sheets, created a schedule for writing, prodded us when we needed prodding to keep the writing process moving along, and provided editorial feedback on every chapter. Thank you, Margaret. This book absolutely would not have seen the light of day without you!

Mark Baker and Steve Kubis, who contributed ace project management and editing work.

Hal Howard, Richard Barnwell, and Ann Beebe, who sponsored the project and provided resources for it.

We’re also grateful to the following members of the product team, who provided us with the reviews and research that helped us refine this book:

Ned Baker

Igor Menshutkin

Ian Beck

Jatan Modi

Andy Blehm

Sasha Nazarov

Jim Brotherton

Adrian Orth

Ed Budrys

Christopher Read (Entirenet)

Gregory Christiaens

Bruce Rivard

Ahmad El Husseini

Gana Sadasivam

Josh Honeyman

Alex Samoylenko

Hitesh Jawa

Karen Scipi

Vijeta Johri

Ramesh Shankar

Bo Kampmann

Tao Wang

Vinod Kumar

Lance Wheelwright

Josh Lange

Chunke Yang

Mey Meenakshisundaram

Arif Kureshy

In addition, we want to thank Joris de Gruyter of Streamline Systems LLC. His SysTestListenerTRX code samples on CodePlex (http://dynamicsaxbuild.codeplex.com/releases), with supporting documentation on his blog (http://daxmusings.blogspot.com/), and his collaboration as we investigated this approach for executing SysTests from Microsoft Dynamics AX were valuable resources as we prepared the chapter on testing.

Microsoft Press

Another big thank-you goes to the great people at Microsoft Press for their support and expertise throughout the writing and publishing process.

Valerie Woolley, the Content Project Manager for the book, who provided ongoing support and guidance throughout the life of the project.

Anne Hamilton—Acquisitions Editor

Christian Holdener—Production Project Manager with S4Carlisle Publishing Services

Allan Iversen—Technical Reviewer

Andrew Jones—Copy Editor

New arrivals

Finally, we would like to welcome the following youngest members of the Microsoft extended family, the children and grandchildren of the authors who arrived during the months that we were laboring on this book:

Charlie Hendrix Bird

Kayden John Healy

Grace Elizabeth Marie Garty

Amrita Nalla

Gavin Roy Healy

Nilay Pandya

Errata & book support

We’ve made every effort to ensure the accuracy of this book and its companion content. Any errors that have been reported since this book was published are listed on our Microsoft Press site at oreilly.com:

http://go.microsoft.com/FWLink/?Linkid=263523

If you find an error that is not already listed, you can report it to us through the same page.

If you need additional support, email Microsoft Press Book Support at .

Please note that product support for Microsoft software is not offered through the addresses above.

We want to hear from you

At Microsoft Press, your satisfaction is our top priority, and your feedback our most valuable asset. Please tell us what you think of this book at

http://www.microsoft.com/learning/booksurvey

The survey is short, and we read every one of your comments and ideas. Thanks in advance for your input!

Stay in touch

Let’s keep the conversation going! We’re on Twitter: http://twitter.com/MicrosoftPress

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset