PUBLISHED BY
Microsoft Press
A Division of Microsoft Corporation
One Microsoft Way
Redmond, Washington 98052-6399
Copyright © 2006 by Microsoft Corporation
All rights reserved. No part of the contents of this book may be reproduced or transmitted in any form or by
any means without the written permission of the publisher.
ISBN-13: 978-0-7356-2257-9
ISBN-10: 0-7356-2257-4
Library of Congress Control Number 2006928843
Printed and bound in the United States of America.
1 2 3 4 5 6 7 8 9 QWT 1 0 9 8 7 6
Distributed in Canada by H.B. Fenn and Company Ltd.
A CIP catalogue record for this book is available from the British Library.
Microsoft Press books are available through booksellers and distributors worldwide. For further information
about international editions, contact your local Microsoft Corporation office or contact Microsoft Press Inter-
national directly at fax (425) 936-7329. Visit our Web site at www.microsoft.com/mspress. Send comments
to mspinput@microsoft.com.
Microsoft, Microsoft Press, Active Directory, ActiveX, bCentral, BizTalk, Excel, FrontPage, IntelliSense,
Internet Explorer, Microsoft Dynamics, MSDN, Outlook, SharePoint, Visio, Visual C#, Visual SourceSafe,
Visual Studio, Windows, Windows Server, X++, and XAL are either registered trademarks or trademarks of
Microsoft Corporation in the United States and/or other countries. Other product and company names men-
tioned herein may be the trademarks of their respective owners.
The example companies, organizations, products, domain names, e-mail addresses, logos, people, places, and
events depicted herein are fictitious. No association with any real company, organization, product, domain
name, e-mail address, logo, person, place, or event is intended or should be inferred.
This book expresses the author’s views and opinions. The information contained in this book is provided with-
out any express, statutory, or implied warranties. Neither the authors, Microsoft Corporation, nor its resellers,
or distributors will be held liable for any damages caused or alleged to be caused either directly or indirectly
by this book.
Acquisitions Editor: Ben Ryan
Project Editor: Maureen Williams Zimmerman
Technical Editor: David W. Robinson
Copy Editor: Crystal Thomas
Indexer: Brenda Miller
Body Part No. X12-41754
Contents at a Glance
Part I A Tour of the Development Environment
1 Architectural Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3
2 The MorphX Development Environment . . . . . . . . . . . . . . . . . . . . . . . . . 21
3 The MorphX Designers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
4 The MorphX Development Tools. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
5 The X++ Programming Language. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91
Part II Developing with Microsoft Dynamics AX
6 Customizing Microsoft Dynamics AX . . . . . . . . . . . . . . . . . . . . . . . . . . . 121
7 Extending Microsoft Dynamics AX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 151
8 The Business Connector . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 189
9 XML Document Integration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 213
Part III Under the Hood
10 The Enterprise Portal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 237
11 Configuration and Security . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 275
12 The Database Layer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 301
13 Advanced MorphX Forms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 361
14 Reflection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 377
15 System Classes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 393
16 Unit Testing. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 415
17 Performance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 427
18 Upgrade and Data Migration. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 463
iii
iv Contents at a Glance
Part IV Appendixes
A Application Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 483
B Microsoft SQL Server 2000, SQL Server 2005, and
Oracle Database 10g Comparison . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 485
C Source Code Changes Required for Upgrade. . . . . . . . . . . . . . . . . . . . . 487
1
Table of Contents
Foreword . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xvii
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxi
Who Is This Book For? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .xxi
The History of Microsoft Dynamics AX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxi
Organization of This Book . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxii
Reading Guide . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxiii
Product Documentation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxiii
Product Web Site. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxiii
Naming . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxiii
Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxiii
Glossary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxiv
Special Legend. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxiv
System Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxiv
Pre-Release Software. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxv
Technologoy Updates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxv
Code Samples. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxv
Support for This Book . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxv
Questions and Comments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxvi
Acknowledgments. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xix
Part I
A Tour of the Development Environment
Architectural Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3
Introduction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
The Operations Environment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
The Application Development and Run-Time Environments . . . . . . . . . . . . . . . . . . . . . 8
Rich Client Application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
Web Client Application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
Integration Client Application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
The Enterprise Portal and Web Parts. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
Application Modeling and Program Specification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
The Application Model Layering System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
What do you think of this book?
We want to hear from you!
Microsoft is interested in hearing your feedback about this publication so we can
continually improve our books and learning resources for you. To participate in a brief
online survey, please visit: www.microsoft.com/learning/booksurvey/
v