Inside Microsoft Dynamics AX 2012 R3 The Microsoft Dynamics AX Team PUBLISHED BY Microsoft Press A Division of Microsoft Corporation One Microsoft Way Redmond, Washington 98052-6399 Copyright © 2014 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 Library of Congress Control Number: 2014940599 ISBN: 978-0-7356-8510-9 Printed and bound in the United States of America First Printing Microsoft Press books are available through booksellers and distributors worldwide If you need support related to this book, email Microsoft Press Book Support at mspinput@microsoft.com Please tell us what you think of this book at http://aka.ms/tellpress Microsoft and the trademarks listed at http://www.microsoft.com/enus/legal/intellectualproperty/Trademarks/EN-US.aspx are trademarks of the Microsoft group of companies All other marks are property of their respective owners The example companies, organizations, products, domain names, email addresses, logos, people, places, and events depicted herein are fictitious No association with any real company, organization, product, domain name, email 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 without 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: Rosemary Caperton Developmental Editor: Carol Dillingham Editorial Production: Online Training Solutions, Inc (OTSI) Copyeditors: Kathy Krause and Victoria Thulman (OTSI) Indexer: Susie Carr (OTSI) Cover: Twist Creative • Seattle and Joel Panchot Contents Foreword Introduction PART I A TOUR OF THE DEVELOPMENT ENVIRONMENT Chapter Architectural overview Introduction AX 2012 five-layer solution architecture AX 2012 application platform architecture Application development environments Data tier Middle tier Presentation tier AX 2012 application meta-model architecture Application data element types MorphX user interface control element types Workflow element types Code element types Services element types Role-based security element types Web client element types Documentation and resource element types License and configuration element types Chapter The MorphX development environment and tools Introduction Application Object Tree Navigating through the AOT Creating elements in the AOT Modifying elements in the AOT Refreshing elements in the AOT Element actions in the AOT Element layers and models in the AOT Projects Creating a project Automatically generating a project Project types The property sheet X++ code editor Shortcut keys Editor scripts Label editor Creating a label Referencing labels from X++ Compiler Best Practices tool Rules Suppressing errors and warnings Adding custom rules Debugger Enabling debugging Debugger user interface Debugger shortcut keys Reverse Engineering tool UML data model UML object model Entity relationship data model Table Browser tool Find tool Compare tool Starting the Compare tool Using the Compare tool Compare APIs Cross-Reference tool Version control Element life cycle Common version control tasks Working with labels Synchronizing elements Viewing the synchronization log Showing the history of an element Comparing revisions Viewing pending elements Creating a build Integrating AX 2012 with other version control systems Chapter AX 2012 and NET Introduction Integrating AX 2012 with other systems Using third-party assemblies Writing managed code Hot swapping assemblies on the server Using LINQ with AX 2012 R3 The var keyword Extension methods Anonymous types Lambda expressions Walkthrough: Constructing a LINQ query Using queries to read data AX 2012 R3–specific extension methods Updating, deleting, and inserting records Limitations Advanced: limiting overhead Chapter The X++ programming language Introduction Jobs The type system Value types Reference types Type hierarchies Syntax Variable declarations Expressions Statements Macros Comments XML documentation Classes and interfaces Fields Methods Delegates Pre-event and post-event handlers Attributes Code access security Compiling and running X++ as NET CIL Design and implementation patterns Class-level patterns Table-level patterns PART II DEVELOPING FOR AX 2012 Chapter Designing the user experience Introduction Role-tailored design approach User experience components Navigation layer forms Work layer forms Role Center pages Cues Designing Role Centers Area pages Designing area pages List pages Scenario: taking a call from a customer Using list pages as an alternative to reports Designing list pages Details forms Transaction details forms Enterprise Portal web client user experience Navigation layer forms Work layer forms Designing for Enterprise Portal Designing for your users Chapter The AX 2012 client Introduction Working with forms Form patterns Form metadata Form data sources Form queries Adding controls Control overrides Control data binding Design node properties Run-time modifications Action controls Layout controls Input controls ManagedHost control Other controls Using parts Types of parts Referencing a part from a form Adding navigation items MenuItem Menu Menu definitions Customizing forms with code Method overrides Auto variables Business logic Custom lookups Integrating with the Microsoft Office client Make data sources available to Office Add-ins Build an Excel template Build a Word template Add templates for users Chapter Enterprise Portal Introduction Enterprise Portal architecture Enterprise Portal components Web parts AOT elements Datasets Enterprise Portal framework controls Developing for Enterprise Portal Creating a model-driven list page Creating a details page AJAX Session disposal and caching Context Data Metadata .. .Inside Microsoft Dynamics AX 2012 R3 The Microsoft Dynamics AX Team PUBLISHED BY Microsoft Press A Division of Microsoft Corporation One Microsoft Way Redmond, Washington... Howard Head of Product Development, Microsoft Dynamics AX Corporate Vice President, Microsoft Dynamics Research and Development Introduction Microsoft Dynamics AX 2012 represents a new generation... 12 AX 2012 services and integration Introduction Types of AX 2012 services System services Custom services Document services Security considerations Publishing AX 2012 services Consuming AX 2012