Books & ebooks about Microsoft tools, technologies, & research. Plus programming best practices. We hope you enjoy this post.
Greetings. We’re happy to announce that Inside Microsoft Dynamics AX 2009 (ISBN: 9780735626454; 720 pages), by The Microsoft Dynamics AX Team, is now available (it shipped to the printer in late May).
The Microsoft Dynamics AX Team focuses on business application innovation and developer productivity. The software architects, developers, test engineers, program managers, and leads who helped write this book spanned two continents yet shared a common vision: Deliver as much technical depth and developer-specific guidance as possible in a single reference.
Please note that this title is a second edition, replacing Inside Microsoft Dynamics AX 4.0 (ISBN: 9780735622579; 544 pages), which we published in 2006. The book has grown 32% to offer you even more detailed information about using Dynamics AX 2009 in advanced ways.
In this post you’ll find the book’s Foreword, written by Microsoft Product Unit Manager Hans J. Skovgaard; its Introduction, which describes how the new book is different from Inside Microsoft Dynamics AX 4.0); and an excerpt from Chapter 3, “The MorphX Tools.”
We hope you’ll find this new title helpful!
Here’s the Foreword:
Foreword
In the course of our engagement with numerous partners and customers, we have learnedhow much developers enjoy working with Microsoft Dynamics AX. We love building ever-more-powerful versions of Dynamics AX that help our customers increase theircompetitiveness; our partners love our product’s powerful set of development tools, whichallow them to build affordable and flexible enterprise resource planning (ERP) systemswhose quality and adaptability are second to none. Some of the examples in this book,such as creating and exposing custom data sets to external applications through a Webservice, can be performed in 10 minutes or less. The very same examples would take atleast a week to complete in other ERP systems.
This is the second edition of this book. We received very positive feedback on the firstedition, Inside Microsoft Dynamics AX 4.0, from people who used the book for a variety ofpurposes: from ramping up new teams and using the information in it to build presentations,to giving copies to customers, prospects, and colleagues. Our aspiration for this new editionis to incorporate the feedback we received on the original book and to cover the technologiesadded to Dynamics AX 2009, such as ASP.NET for Enterprise Portal, new Workflow functionality,Role Centers with advanced business intelligence, and the new Batch framework.
We believe that this book, which aims to provide developers with solid information onadvanced concepts, can make your entry into the powerful toolset for building businessapplications a much smoother and more digestible learning experience. We hope that thisbook is received as an insightful resource for many people working with Dynamics AX 2009.
I want to thank the coauthors for using their evenings and weekends to contribute to this book.
I wish you success with your implementation and customization of Microsoft Dynamics AX 2009.
Hans J. SkovgaardProduct Unit ManagerMicrosoft Corporation
Introduction
We understand if you’re a bit skeptical when we tell you that you are about to fall for a pieceof software. We want you to know up front that our intention is to show you all the wonderfuland amazing benefits that Microsoft Dynamics AX 2009 has to offer your business.
Here are some reactions from our partners and customers who have been involved in theearly adoption.
The release of Microsoft Dynamics AX 2009 shows a tremendous developmenteffort on Microsoft’s side not only for those already familiar with the product butfor newcomers too. This is the best release yet. Jesper R. Hansen, Partner, thy:innovation
The completeness of the . . . release of Microsoft Dynamics AX 2009 will helpexisting and new customers reduce the cost of additional customization andtherefore reduce the total implementation cost. Sven Sieverink, Business Consultant, Dynamics Software
The out-of-the-box Role Centers in Microsoft Dynamics AX 2009 add value fromday one for all employees in our organization. Our users see enormous value withthe visuals, the ability to easily design cues, and the year-to-year comparison. John Elmer, Vice President of Information Systems, Rodgers and Hammerstein
The Business Intelligence possibilities and integrated workflow offer my teampowerful tools to do the job themselves. Greg Brock, Director Information Systems, Techmer PM
Who Is This Book For?
This book delves into the technology and tools in Dynamics AX 2009. New and experienceddevelopers are the intended target audience, and consultants will also benefit from readingthis book. The intention is not to give guidance on application functionality but rather tooffer as much technical information between the two covers as possible. It is also beyond thescope of this book to include details about installation, upgrade, deployment, and sizing ofproduction environments. Refer to the extensive installation and implementation documentationsupplied with the product for more information on these topics.
To get full value from this book, you should have knowledge of common object-orientedconcepts from languages such as C++, C#, and Java. Knowledge of Structured QueryLanguage (SQL) is also an advantage. SQL statements are used to perform relational databasetasks such as data updates and data retrieval.
Note If you don’t have the Dynamics AX license that provides developer rights, you won’t beable to perform most of the actions in this book. A virtual PC version of Dynamics AX 2009,with developer rights, is available for partners to download at https://mbs.microsoft.com/partnersource/undefined
The History of Microsoft Dynamics AX
Historically, Dynamics AX envelops more than 25 years of experience in business applicationinnovation and developer productivity. Microsoft acquired Dynamics AX in 2002; the successof the product has spurred an increasing commitment of research and development resources,which allow Dynamics AX to continuously grow and strengthen its offering.
The development team that created Dynamics AX 2009 consists of three large teams, twoof which are based in the United States (Fargo, North Dakota, and Redmond, Washington)and one based in Denmark (Copenhagen). The Fargo team focuses on finance and humanresources (HR), the Redmond team concentrates on Microsoft Project and CRM, andCopenhagen team delivers Supply Chain Management (SCM). In addition, a frameworkteam, distributed over the three sites, develops infrastructure components. Finally, a worldwidedistributed team localizes the Dynamics AX features to meet national regulations orlocal differences in business practices, allowing the product to ship in 24 main languages in38 countries.
To clarify a few aspects of the origins of Dynamics AX, the authors contacted people whoparticipated in the early stages of the Dynamics AX development cycle. The first question weasked was, How was the idea of using X++ as the programming language for Dynamics AXconceived?
We had been working with an upgraded version of XAL for a while called OOXAL back in 1996/1997. At some point in time, we stopped and reviewed ourapproach and looked at other new languages like Java. After working one longnight, I decided that our approach had to change to align with the latest trends inprogramming languages, and we started with X++. Erik Damgaard, cofounder of Damgaard Data
We had been working with an upgraded version of XAL for a while called OOXAL back in 1996/1997. At some point in time, we stopped and reviewed ourapproach and looked at other new languages like Java. After working one longnight, I decided that our approach had to change to align with the latest trends inprogramming languages, and we started with X++.
Erik Damgaard, cofounder of Damgaard Data
Of course, there were several perspectives among the developers on this breakthroughevent.
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 haveany tools, so for months we were programming in Notepad without compiler oreditor support. Anonymous developer (but among the authors of this book!)
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 haveany tools, so for months we were programming in Notepad without compiler oreditor support.
Anonymous developer (but among the authors of this book!)
Many hypotheses exist regarding the origin of the original product name, Axapta. Axaptawas a constructed name, and the only requirement was that the letter X be included, tomark the association with the predecessor XAL. The X association carries over in the nameDynamics AX.
Organization of This Book
Part I , “A Tour of the Development Environment,” is mainly for people new to DynamicsAX. It describes the application architecture from the perspective of development,deployment, and administration. The chapters in Part I also provide a tour of the internalDynamics AX development environment to help new developers familiarize themselveswith designers, tools, the X++ programming language, and the object-oriented applicationframework that they will use to implement their customizations, extensions, andintegrations.
Parts II (“Core Development Concepts”) and III (“Under the Hood”) are largely devoted toillustrating how developers use the Dynamics AX application framework. Through codesamples written for a fictitious bicycle sales and distribution company, Part II describes howto customize and extend Dynamics AX. The examples show how the fictitious company customizes,extends, and integrates the application to support its online make-to-order sales,distribution, and service operations.
Reading Guide
If you are an experienced Dynamics AX developer, you might want to skip the tour of thedevelopment environment after reading Chapter 1, “Architectural Overview,” and movestraight to Part II or Part III, which consist of chapters that can be read in random order. Oruse the book as a reference for subjects that you are especially interested in.
Differences from Inside Microsoft Dynamics AX 4.0
This book is an update to the book Inside Microsoft Dynamics AX 4.0. Along with changesmade to existing chapters, we added several new chapters, on workflow, Role Centers, theBatch framework, reporting, and code upgrade. We have significantly expanded the performancechapter, and the Enterprise Portal chapter now describes the new ASP.NET tooling.
We greatly extended the chapter “XML Document Integration” in the first edition, renamingit as “The Application Integration Framework” (Chapter 17).
We removed the chapters on advanced MorphX forms and system classes becausethese were least referenced by readers. You can find extensive documentation on MorphXforms and system classes in the Dynamics AX 2009 software development kit (SDK), whichis on MSDN. And the previous version of this book is still a good source of informationbecause some of the technologies haven’t changed much. We also removed the chapter onupgrade and data migration and replaced that content with a significantly enhanced seriesof chapters on the version upgrade process, found in the bonus eBook, which can be foundon this book’s companion Web site: http://www.microsoft.com/learning/en/us/books/13345.
Finally, the chapter on unit testing has been merged into the chapter on the MorphX tools(Chapter 3).
Product Documentation
In addition to this book, you can read thousands of topic pages of product documentationon application and system issues in the online Help. Extensive documentation on installationand implementation is available in the Microsoft Dynamics AX 2009 SDK and the MicrosoftDynamics AX Implementation Guide, both supplied with the product. You can also find theproduct documentation on MSDN. And if you have an installation of Dynamics AX 2009, youhave access to the following topic areas on the Help menu: Administrator Help, DeveloperHelp, and User Help.
Product Web Site
The user portal for Dynamics AX encompasses product and purchase information as well asguidelines for using the product and links to online newsgroups and user communities.For more information, visit the site http://www.microsoft.com/dynamics/ax.
Naming
With the latest version of the application, the name of the product changed to MicrosoftDynamics AX 2009. The previous product versions were named Microsoft Axapta andMicrosoft Dynamics AX 4.0. For easier reading, this book refers to the 2009 version of theproduct as Dynamics AX 2009 or just Dynamics AX and refers specifically to earlier versionswhere appropriate.
Code
All relevant code examples are available for download. For details on the companion Website, see the “Code Samples” section later in this introduction. You might need to modifysome of the code samples to execute them. The necessary changes are described eitherin the .xpo files themselves or in the readme fi le associated with the code samples on thecompanion Web site.
Glossary
Like all software, Dynamics AX involves the use of many abbreviations, acronyms, and technicalexpressions. Much of this information is available in a glossary that you will find at theback of the book. For a larger list of terms and abbreviations, refer to the glossary providedwith the product documentation.
Special Legend
To distinguish between SQL and X++ statements, this book uses the common practice forSQL keywords, which is to display them in all capital letters. The following code shows anexample of this in connection with nested transactions, where a transaction is started in X++and later sent to a SQL server.
System Requirements
You need the following hardware and software to build and run all the code samples forthis book:
Because the requirements typically evolve with service packs that support new versionsof underlying technologies, we recommend that you check for the latest updated systemrequirements at http://www.microsoft.com/dynamics/ax/using/2009systemrequirements.mspx.
Release Software
This book was reviewed and tested against the RTM version of Dynamics AX 2009. Anychanges or corrections to this book will be added to a Microsoft Knowledge Base article. Fordetails, see the “Support for This Book” section in this introduction.
Technology Updates
As technologies related to this book are updated, links to additional information will be addedto the Microsoft Press Technology Updates Web site. Visit this site periodically for updates onMicrosoft Visual Studio 2005 and other technologies: http://www.microsoft.com/mspress/updates.Code SamplesAll code samples discussed in this book can be downloaded from the book’s companion contentpage at the following address: http://www.microsoft.com/learning/en/us/books/13345.aspx.
Bonus Content
On the companion Web site you’ll find an eBook that contains several bonus chapters.Chapter 1, “Introduction to Upgrade,” Chapter 2, “Code Upgrade” (also Chapter 18 of thisbook), Chapter 3, “Data Upgrade,” and Chapter 4 “Upgrade Additional Topics.”
The upgrade information you find in this eBook gives you a solid overview of the DynamicsAX 2009 upgrade process, tells you about the tools that are available to walk you throughthe upgrade process, and gives you some tips and best practice guidelines; it does not giveyou detailed procedures—simply because version upgrade is such a large topic. A wealth ofprocedural and other information on the upgrade process is available with the Dynamics AXproduct; we have included a list of those resources at the end of this introduction. You candownload the eBook from http://www.microsoft.com/learning/en/us/books/13345.aspx.
Chapter 3
The MorphX Tools
In this chapter:Introduction 37Application Object Tree 39Project Designer 45Property Sheet 49X++ Code Editor 50Label Editor 53Visual Form Designer and Visual Report Designer 56Code Compiler 59Dynamics AX SDK 61Best Practices Tool 62Debugger 65Visio Reverse Engineering Tool 69Table Browser Tool 75Find Tool 76Compare Tool 78Cross-Reference Tool 83Version Control 86Unit Test Tool 96
The objectives of this chapter are to:
Dynamics AX includes a set of tools, the MorphX development tools, that allow developersto build and modify Dynamics AX business applications. Each feature of a business applicationuses the application model elements described in Chapter 2, “The MorphX DevelopmentEnvironment.” The MorphX tools enable developers to create, view, modify, and delete theapplication model elements, which contain metadata, structure (ordering and hierarchiesof elements), properties (key and value pairs), and X++ code. For example, a table elementincludes the name of the table, the properties set for the table, the fields, the indices, therelations, the methods, and so on.
This chapter describes the most commonly used tools and offers some tips and tricks forworking with them. You can find additional information and an overview of other MorphXtools in the MorphX Development Tools section of the Microsoft Dynamics AX softwaredevelopment kit (SDK) 2009 on MSDN.
Tip To enable the development mode of Dynamics AX 2009, press Ctrl+Shift+D. Ctrl+Shift+D isa toggle key that also returns you to content mode.
Table 3-1 lists the MorphX tools that are discussed in this chapter.
You can access these development tools from the following places:
Note The Microsoft Dynamics AX SDK contains valuable developerdocumentation and is updatedfrequently. Find it in the Microsoft Dynamics AX Developer Center on msdn.microsoft.com.
You can personalize the behavior of many MorphX tools by clicking Options on the Toolsmenu. Figure 3-1 shows the Options dialog box.
Application Object Tree
The AOT is the main entry point to MorphX and is the repository explorer for all metadata.You can open the AOT by clicking the AOT icon on the toolbar or by pressing Ctrl+D. TheAOT icon looks like this:
Navigating the AOT
As the name implies, the AOT is a tree view. The root of the AOT contains the elementcategories, such as Classes, Tables, and Forms. Some elements are grouped into subcategoriesto provide a better structure. For example, Tables, Maps, Views, and Extended Data Typesreside under Data Dictionary, and all Web-related elements are found under Web. Figure 3-2shows the AOT.
You can navigate the AOT by using the arrow keys on the keyboard. Pressing the Right arrowkey expands a node if it has any children.
Elements are ordered alphabetically. Because thousands of elements exist, understanding thenaming conventions and adhering to them is important to effectively using the AOT.
All element names in the AOT follow this structure:
<Business area name> + <Business area description> + <Action performed or type ofcontent>
In this naming convention, similar elements are placed next to each other. The business areaname is also often referred to as the prefix. Prefixes are commonly used to indicate the teamresponsible for an element.
Table 3-2 contains a list of the most common prefixes and their descriptions.
Tip When creating new elements, make sure to follow the recommended naming conventions.Any future development and maintenance will be much easier.
The Project Designer, described in detail later in this chapter, provides an alternative view ofthe information organized by the AOT.
Creating New Elements in the AOT
You can create new elements in the AOT by right-clicking the element category node andselecting New <Element Name>, as shown in Figure 3-3.
Objects are given automatically generated names when they are created. However, you shouldreplace the default names with new names in accordance with the naming conventions.
Modifying Elements in the AOT
Each node in the AOT has a set of properties and either subnodes or X++ code. You can usethe property sheet (shown in Figure 3-9) to inspect or modify properties, and you can usethe X++ code editor (shown in Figure 3-11) to inspect or modify X++ code.
The order of the subnodes can play a role in the semantics of the element. For example, thetabs on a form display in the order in which they are listed in the AOT. You can change theorder of nodes by selecting a node and pressing the Alt key while pressing the Up or Downarrow key.
A red vertical line next to an element name marks it as modified and unsaved, or dirty, asshown in Figure 3-4.
A dirty element is saved in the following situations:
Refreshing Elements in the AOT
If several developers modify elements simultaneously in the same installation of DynamicsAX, each developer’s local elements could become out of sync with the latest version. Toensure that the local versions of remotely changed elements are updated, an autorefreshthread runs in the background. This autorefresh functionality eventually updates all changes,but you might want to explicitly force a refresh. You do this by right-clicking the elementyou want to restore and then selecting Restore. This action refreshes both the on-disk andthe in-memory versions of the element. The following is a less elegant way of ensuring that thelatest elements are used:
1. Close the Dynamics AX client to clear in-memory elements.2. Close the Dynamics Server service on the Application Object Server (AOS) to clearin-memory elements.3. Delete the application object cache files (*.auc) from the Local Application Data folder(located in Documents and Settings\<User>\Local Settings\Application Data) to removethe on-disk elements.
Note Before Dynamics AX 4.0, the application object cache was stored in .aoc files. To supportUnicode, the file extension was changed to .auc in Dynamics AX 4.0.
Element Actions in the AOT
Each node in the AOT contains a set of available actions. You can access these actions fromthe context menu, which you can open by right-clicking the node in question.
Here are two facts to remember about actions:
A frequently used action is Open New Window, which is available for all nodes. It opens anew AOT window with the current nodes as the root. We used this action to create the screencapture of the CustTable element shown in Figure 3-4. Once you open a new AOT window,you can drag elements into the nodes, saving time and effort when you’re developing anapplication.
You can extend the list of available actions on the context menu. You can create customactions for any element in the AOT by using the features provided by MorphX. In fact, allactions listed on the Add-Ins submenu are implemented in MorphX by using X++ and theMorphX tools.
You can enlist a class as a new add-in by following this procedure:
1. Create a new menu item and give it a meaningful name, a label, and Help text.2. Set the menu item’s Object Type property to Class.3. Set the menu item’s Object property to the name of the class to be invoked by theadd-in.4. Drag the menu item to the SysContextMenu menu.5. If you want the action available only for certain nodes, you need to modify theverifyItem method on the SysContextMenu class.
Element Layers in the AOT
When you modify an element from a lower layer, a copy of the element is placed in thecurrent layer. All elements in the current layer appear in bold type (as shown in Figure 3-5),which makes it easy to recognize changes. For a description of the layer technology, see thesection “Application Model Layering System” in Chapter 1, “Architectural Overview.”
You can use the Application Object Layer setting in the Options dialog box to personalizethe layer information shown in the AOT. Figure 3-5 shows a class with the option set to AllLayers. As you can see, each method is suffixed with information about the layers in which itis defined, such as sys, var, and usr. If an element exists in several layers, you can right-clickit and select Layers to access its versions from lower layers. We highly recommend the AllLayers setting during code upgrade because it provides a visual representation of the layerdimension directly in the AOT.
Note If you modify an element that exists in a higher layer than your current layer, all modificationsare redirected to the upper layer where the element is defined.
What kind of device is it on the front of the book?
Hi, Stefan. The tool is a “tracing profile gauge”: http://www.leevalley.com/wood/page.aspx?c=2&p=32523&cat=1,42936,42958
Hey DevonM,
Thanks for explaining!
Greetings,
Stefan
It's also useful for rhinoplasty! ;-)
Hi DevonM,
The book has been released over two months, but I still cannot see it on the MS Press E-Reference. When do you think it will be available on E-Reference?
Thanks
Hi ,
I have inside Microsoft Dynamics Ax4.0 , but I still cannot see new release ax 2009 on the MS Press E-Reference. pls provide line as early as possible.
Thanks...