Microsoft Dynamics AX 2009 Development Cookbook - Mindaugas Pocius - E-Book

Microsoft Dynamics AX 2009 Development Cookbook E-Book

Mindaugas Pocius

0,0
39,59 €

-100%
Sammeln Sie Punkte in unserem Gutscheinprogramm und kaufen Sie E-Books und Hörbücher mit bis zu 100% Rabatt.

Mehr erfahren.
Beschreibung

Microsoft Dynamics AX provides a comprehensive Enterprise Resource Planning (ERP) solution for mid-size and larger organizations. Dynamics AX implementations are used worldwide by thousands of customers. With the new version - Dynamics AX 2009 - the system is due to expand even more rapidly.
Every new implementation requires some level of customization, and all organizations want this to be done to the highest standards using proven approaches.
This step-by-step guide will help you manage your company's ERP information and operations efficiently, and solve your business process problems in an effective and quick way. This book focuses on commonly used custom modifications in major Dynamics AX modules. This book contains commonly used bits of code which were real-world tested in at least one successful Dynamics AX implementation. Many of the recipes were deployed in many implementations and even across several versions of Dynamics AX. The examples in this book cover various areas of Dynamics AX to help developers not only learn about programming, but also about the functional side of Dynamics AX. The book should help developers who already know the basics of Dynamics AX programming to step up to the next level.
The recipes allow you to look at the development from the perspective of business processes. You will learn to enhance your user interface using various Dynamics AX UI elements. Managing your data and functions will become easier. You will also get numerous development tips and tricks from a Dynamics AX development expert.

Das E-Book können Sie in Legimi-Apps oder einer beliebigen App lesen, die das folgende Format unterstützen:

EPUB

Seitenzahl: 299

Veröffentlichungsjahr: 2009

Bewertungen
0,0
0
0
0
0
0
Mehr Informationen
Mehr Informationen
Legimi prüft nicht, ob Rezensionen von Nutzern stammen, die den betreffenden Titel tatsächlich gekauft oder gelesen/gehört haben. Wir entfernen aber gefälschte Rezensionen.



Table of Contents

Microsoft Dynamics AX 2009 Development Cookbook
Credits
About the Author
About the Reviewers
Preface
What this book covers
Who this book is for
What you need for this book
Conventions
Reader feedback
Customer support
Downloading the example code for the book
Errata
Piracy
Questions
1. Processing Data
Introduction
Creating a new number sequence
How to do it...
How it works...
See also
Renaming the primary key
How to do it...
How it works...
Merging two records
How to do it...
How it works...
Adding document handling notes
How to do it...
How it works...
Using a normal table as temporary table
How to do it...
How it works...
See also
Copying a record
How to do it...
How it works...
There's more...
Building a query object
How to do it...
How it works...
There's more...
Using the OR operator
Using arrays fields
See also
Using a macro in a SQL statement
How to do it...
How it works...
Executing a direct SQL statement
How to do it...
How it works...
There's more...
Enhancing the data consistency check
Getting ready
How to do it...
How it works...
There's more...
Exporting to an XML file
How to do it...
How it works...
Importing from an XML file
How to do it...
How it works...
Creating a comma-separated value file
How to do it...
How it works...
There's more...
Reading a comma-separated value file
How to do it...
How it works...
There's more...
Deleting all company transactional data
How to do it...
How it works...
2. Working with Forms
Introduction
Creating Dialogs
How to do it...
How it works...
Handling dialog events
How to do it...
How it works...
There's more...
Creating dynamic menu buttons
How to do it...
How it works...
Building dynamic form
How to do it...
How it works...
Adding form splitters
How to do it...
How it works...
Creating modal forms
How to do it...
How it works...
There's more...
Changing common form appearance
How to do it...
How it works...
There's more...
See also
Storing last form values
How to do it...
How it works...
Using tree controls
How to do it...
How it works...
There's more...
See also
Building checklists
How to do it...
How it works...
There's more...
Adding a "Go to the Main Table Form" link
How to do it...
How it works...
Modifying the User setup form
How to do it...
How it works...
Modifying application version
Getting ready
How to do it...
How it works...
There's more...
3. Working with Data in Forms
Introduction
Handling number sequences
How to do it...
How it works...
See also
Creating custom filters
How to do it...
How it works...
There's more...
See also
Creating custom instant search filters
How to do it...
How it works...
Building selected/available lists
How to do it...
How it works...
There's more...
Preloading images
How to do it...
How it works...
There's more...
See also
Creating wizards
How to do it...
How it works...
Creating default data wizards
How to do it...
How it works...
See also
Processing multiple records
How to do it...
How it works...
There's more...
Coloring records
How to do it...
How it works...
Adding images to records
How to do it...
How it works...
There's more...
Displaying an image as a part of a form
Saving a stored image as a file
4. Building Lookups
Introduction
Creating an automatic lookup
How to do it...
How it works...
There's more...
Creating a lookup dynamically
How to do it...
How it works...
Using a form for lookup building
How to do it...
How it works...
See also
Building a tree lookup
How to do it...
How it works...
See also
Displaying a list of custom options
How to do it...
How it works...
There's more...
Companies
Domains
User groups
Users
Tables
Table fields
Classes
Interfaces
Another way of displaying custom options
How to do it...
How it works...
There's more...
Building a lookup based on record description
How to do it...
How it works...
There's more...
Browsing for folders
How to do it...
How it works...
There's more...
Manual folder browsing lookup
Adding a Make New Folder button
Selecting a file
How to do it...
How it works...
There's more...
Picking a color
How to do it...
How it works...
There's more...
See also
Choosing a font
How to do it...
How it works...
5. Processing Business Tasks
Introduction
Creating new general journals
How to do it...
How it works...
There's more
Posting general journals
How to do it...
How it works...
Processing project journals
How to do it...
How it works...
There's more...
Creating and posting ledger vouchers
How to do it...
How it works...
Changing automatic transaction text
Getting ready
How to do it...
How it works...
There's more...
Creating purchase orders
How to do it...
How it works...
Posting purchase orders
How to do it...
How it works...
There's more...
Creating sales orders
How to do it...
How it works...
Posting sales orders
How to do it...
How it works...
There's more...
Creating company-specific document layout
How to do it...
How it works...
Creating electronic payment format
How to do it...
How it works...
Building a "Display dimensions" dialog
How to do it...
How it works...
6. Integration with Microsoft Office
Introduction
Creating Excel files
How to do it...
How it works...
Reading Excel files
How to do it...
How it works...
Creating Word documents from templates
Getting ready
How to do it...
How it works...
Creating configuration documents using Word
Getting ready
How to do it...
How it works...
Exporting data to Microsoft Project
Getting ready
How to do it...
How it works...
Sending email using Outlook
Getting ready
How to do it...
How it works...
Index

Microsoft Dynamics AX 2009 Development Cookbook

Mindaugas Pocius

Microsoft Dynamics AX 2009 Development Cookbook

Copyright © 2009 Packt Publishing

All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews.

Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the author, Packt Publishing, nor its dealers or distributors will be held liable for any damages caused or alleged to be caused directly or indirectly by this book.

Packt Publishing has endeavored to provide trademark information about all the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information.

First published: December 2009

Production Reference: 1111209

Published by Packt Publishing Ltd.

32 Lincoln Road

Olton

Birmingham, B27 6PA, UK.

ISBN 978-1-847199-42-3

www.packtpub.com

Cover Image by Parag Kadam (<[email protected]>)

Credits

Author

Mindaugas Pocius

Reviewers

David Probst

Fred Shen

Acquisition Editor

Douglas Paterson

Development Editor

Ved Prakash Jha

Technical Editor

Pallavi Kachare

Copy Editor

Leonard D'Silva

Editorial Team Leader

Akshara Aware

Project Team Leader

Lata Basantani

Project Coordinator

Srimoyee Ghoshal

Proofreader

Chris Smith

Indexer

Rekha Nair

Production Coordinator

Dolly Dasilva

Cover Work

Dolly Dasilva

About the Author

Mindaugas Pocius is currently a freelance Dynamics AX technical and functional consultant and trainer at DynamicsLab Limited (www.dynamicslab.com). The company specializes in providing development, consulting, and training services for Microsoft Dynamics AX resellers and customers.

Mindaugas started his IT consultant career back in 2001 while still in his Information Technology Master Studies in Lithuanian university. Since then he has become a recognized Microsoft Certified Professional for AX in all major areas: Development (including Enterprise Portal), Configuration & Installation, Financials, Project, Trade & Logistics. He is also a Certified Microsoft Trainer for Dynamics AX and has delivered numerous Dynamics AX Development and Financial trainings across the Europe.

From 2001 till 2009, Mindaugas participated in over 15 Dynamics AX implementations, ranging from small 10-15 to international 100-500 user projects. He has had a wide range of development, consulting, and leading roles while always maintaining a significant role as a business application developer.

I would like to thank my family for their support during the writing of this book, for their understanding of my long hours spent on this work. I would also like to thank all the people who made this book possible.

About the Reviewers

David Probst has a background in Economics and Computer Science and has been working professionally on Microsoft Dynamics AX since 2001, focusing on specific modules including CRM, Service Management, Shop Floor Control, and Environmental Sustainability.

Fred Shen started to work with Dynamics AX in 2004. He was a team member on the very first AX project localizing AX for the Chinese market. After that, he worked for a leading service provider of business, information technology, and communications solutions—Fujitsu Australia. In 2008, he joined Epartners Australia as a senior technical consultant.

Fred Shen is also one of the webmasters in MBSCN.NET, the Chinese Microsoft Dynamics user group. He was recognized as a Dynamics AX Most Valuable Professional for the contribution he has made to the Chinese Dynamics AX communities.

Preface

As a Dynamics AX developer, your responsibility is to deliver all kinds of application customizations, whether they are small adjustments or bespoke modules. Dynamics AX is a highly customizable system and requires a significant amount of knowledge and experience to deliver quality solutions. A single goal can be achieved in multiple ways, and there is always a question—which way is the best?

This book takes you through numerous practically proven recipes to help you with the daily development tasks. Each recipe contains detailed step-by-step instructions along with application screenshots and in-depth explanations. The recipes cover multiple Dynamics AX modules, and as a result, the book gives a developer an overview of the functional aspects of the system too.

What this book covers

The book's content is presented in six chapters covering the following areas:

Chapter 1, Processing Data focuses on data manipulation. It explains how to build data queries, how to check and modify existing data, and how to read or write comma-separated and XML files.

Chapter 2, Working with Forms covers the various aspects of using Dynamics AX forms. In this chapter, dialogs and their events are explained. Various useful features like splitters, saving last values, changing form appearance, dynamic controls, and others are also explained.

Chapter 3, Working with Data in Forms basically supplements the previous chapter and explains about data organization in forms. The examples in this chapter include instructions on how to build form data filters, process multiple records at a time, create data wizards, checklists, and the use of colors and images.

Chapter 4, Building Lookups covers all kinds of lookups in the system. The chapter starts with a simple automatically generated lookup, continues with more advanced ones, and finishes with standard Windows lookups like the file selection dialog or the color picker.

Chapter 5, Processing Business Tasks explains the usage of Dynamics AX business logic API. This chapter discusses topics on processing journals, purchase, and sales orders. Other features like posting financial vouchers directly, modifying transaction texts and creating electronic payment formats are included too.

Chapter 6, Integration with Microsoft Office shows how MS Word, Excel, Outlook, and Project can be used with Dynamics AX.

Who this book is for

This book is for Dynamics AX developers primarily focused on delivering time-proven application modifications. Although new X++ developers could use this book along with their beginner's guides, this book is more focused on people who are willing to raise their programming skills above the beginner's level and at the same time learn the functional aspects of Dynamics AX. So, some Dynamics AX coding experience is expected.

What you need for this book

All the coding examples were done in virtual Microsoft Dynamics AX 2009 Image from Microsoft Learning Download Centre. The following list of software from the virtual image was used in this book:

Microsoft Windows Server 2003 Enterprise Edition (Service Pack 2)Dynamics AX 2009 RTM (kernel version: 5.0.593.0, application version: 5.0.593.0)Microsoft Office Excel 2007Microsoft Office Word 2007Microsoft Office Outlook 2007Microsoft Office Project 2007 (installed manually as an additional component)NotepadInternet Explorer 7

The mentioned software does not necessary have to be in a virtual image. The recipes could be implemented in any Dynamics AX 2009 RTM environment with no previous modifications.

Although all recipes were tested on the mentioned software, they might work on older or newer software versions without any implications or with minor code adjustments.

Reader feedback

Feedback from our readers is always welcome. Let us know what you think about this book—what you liked or may have disliked. Reader feedback is important for us to develop titles that you really get the most out of.

To send us general feedback, simply drop an email to <[email protected]>, and mention the book title in the subject of your message.

If there is a book that you need and would like to see us publish, please send us a note in the SUGGEST A TITLE form on www.packtpub.com or email <[email protected]>.

If there is a topic that you have expertise in and you are interested in either writing or contributing to a book, see our author guide on www.packtpub.com/authors.

Customer support

Now that you are the proud owner of a Packt book, we have a number of things to help you to get the most from your purchase.

Downloading the example code for the book

Visit http://www.packtpub.com/files/code/9423_Code.zip to directly download the example code.

The downloadable files contain instructions on how to use them.

Errata

Although we have taken every care to ensure the accuracy of our contents, mistakes do happen. If you find a mistake in one of our books—maybe a mistake in text or code—we would be grateful if you would report this to us. By doing so, you can save other readers from frustration, and help us to improve subsequent versions of this book. If you find any errata, please report them by visiting http://www.packtpub.com/support, selecting your book, clicking on the let us know link, and entering the details of your errata. Once your errata are verified, your submission will be accepted and the errata added to any list of existing errata. Any existing errata can be viewed by selecting your title from http://www.packtpub.com/support.

Piracy

Piracy of copyright material on the Internet is an ongoing problem across all media. At Packt, we take the protection of our copyright and licenses very seriously. If you come across any illegal copies of our works in any form on the Internet, please provide us with the location address or web site name immediately so that we can pursue a remedy.

Please contact us at <[email protected]> with a link to the suspected pirated material.

We appreciate your help in protecting our authors, and our ability to bring you valuable content.

Questions

You can contact us at <[email protected]> if you are having a problem with any aspect of the book, and we will do our best to address it.

Chapter 1. Processing Data

In this chapter, we will cover the following topics:

Creating a new number sequenceRenaming the primary keyMerging two recordsAdding document handling notesUsing a normal table as temporary tableCopying a recordBuilding a query objectUsing a macro in a SQL statementExecuting a direct SQL statementEnhancing the data consistency checkExporting to an XML fileImporting from an XML fileCreating a comma-separated value fileReading a comma-separated value fileDeleting all company transactional data

Introduction

This chapter focuses on data manipulation exercises. Here, we will discuss how to work with query objects from X++ code. We will also discuss how to reuse macros in X++ SQL statements and how to send SQL statements directly to the database. This chapter will explain how to rename primary keys, how to merge and copy records, how to add document handling notes to selected records, and how to clean up the testing system by deleting all transactional data.