Book Image

Microsoft Dynamics AX 2009 Programming: Getting Started

By : Erlend Dalen
Book Image

Microsoft Dynamics AX 2009 Programming: Getting Started

By: Erlend Dalen

Overview of this book

<p>Microsoft Dynamics AX 2009 is Enterprise Resource Planning (ERP) software that comes with its own development environment and a programming language called X++. It is specialized and optimized to solve the tasks that are typical of an ERP system. But the specialized development environment of AX brings a steep learning curve. Hence, getting started with Dynamics AX and mastering it effectively can sometimes be daunting.<br /><br />This tutorial has been carefully structured to guide you through the basic features of AX development, and get you started as quickly as possible. With this book, you will soon be able to develop and maintain comprehensive management solutions for enhancing your application's performance.<br /><br />The book starts with a tour of the development environment, which helps you gain a deep understanding of Dynamics AX tools and architecture. It will introduce you to the X++ language. It helps you to create new functionality that can be used and changed in the standard application. You'll also learn how to search, manipulate, and integrate data.<br />The practical examples in this book take you through sample AX development projects and help you learn to create forms, reports, menu items, menus, and navigation pages. It also helps you work with the MorphX application.<br /><br />The author's experience of developing solutions with Dynamics AX enables him to share insights in an effective, clear, and friendly way.<br /><br />By the end of this book, you will have a better understanding of the inner workings of Microsoft Dynamics AX &ndash; making your development simpler and faster, and your applications fast, reliable, and robust.</p>
Table of Contents (20 chapters)
Microsoft Dynamics AX 2009 Programming: Getting Started
Credits
About the Author
About the Reviewers
Preface
Links
Debugger
Index

Preface

First of all, I would like to thank you for buying this book.

My aim in writing this book has been to try and make the process of learning AX programming easier for developers who are new to AX. There may be several ways of achieving this. I have simply focused on the areas that I feel are most important. I have briefly mentioned, or even left out, areas that you most likely don't need in the beginning of your AX development career.

Another way in which I have tried to simplify the learning process has been to write less about background processes and how things work in theory, instead giving good examples that you can apply in your daily work.

I hope that you will enjoy reading this book and that it will put you on a fast track to become an efficient Dynamics AX developer.

Welcome to the wonderful world of AX programming!

What this book covers

Chapter 1: Getting to know Dynamics AX 2009 - This chapter takes you through the development environment in AX and explains some of the development tools that are included with AX. You will also write your first AX program, if you have never done so before.

Chapter 2: X++ - This chapter covers the basics of AX's programming language X++ and explains in brief how data types, statements and loops, operators, classes and methods, and macros work.

Chapter 3: Storing data - This chapter takes you through the process of creating extended data types, tables, and relations.

Chapter 4: Data User Interaction - This chapter shows you how to create forms where users can read, update, insert, and delete data. It also shows you how to create reports, menu items, navigation pages, and menus.

Chapter 5: Searching for Data - This chapter explains the different options to use when you need to search and retrieve a set of data from the database. It shows you how to create a query, how to create a view, and how to write different select statements.

Chapter 6: Manipulate Data - This chapter shows you how to insert, update, and delete data using table methods to manipulate one record at a time and set based manipulation to manipulate a set of data.

Chapter 7: Integrate Data - This chapter shows you how to read and write data to and from different kind of files and to and from a database using ODBC. It also provides an example of how to write a generic import and export program in AX.

Chapter 8: Integrate with standard AX - This chapter shows you how some of the main modules in AX (Inventory, Ledger, Account Receivable, and Accounts Payable) are built by looking at their entity schemas and by providing examples of how to perform typical tasks within these modules.

Chapter 9: Creating a New Module - This chapter shows you how to create a new module in AX by creating number sequences, parameter tables, license codes, configuration keys, and security keys.

Chapter 10: Working with .NET and AX - This chapter explains how you can use .NET classes in AX with the Common Language Runtime and how you can write .NET code that uses AX classes by using the .NET Business Connector for AX.

Chapter 11: Web Services - This chapter shows you how to create a web service that expose AX logic, how to publish the web service to Internet Information Services (IIS), and how to make AX consume a web service.

Chapter 12: Enterprise Portal - This chapter takes you through an example of how to expose AX data to web by using the Enterprise Portal and SharePoint.

Appendix A: Links - This appendix will provide you with references to websites and help files in AX, so that it easier for you to find them again later.

Appendix B: Debugger - This appendix will act as a quick guide on how to use the debugger tool.

What you need for this book

All of the examples in this book have been created using the Virtual PC (VPC) image called Pre-Sales Demonstration Toolkit For Microsoft Dynamics AX 2009.

I would recommend that you either use the VPC or an AX installation that is not in use by anyone else when you follow the examples in this book so that you don't step on anyone's toes.

The VPC can be downloaded here if you are a Microsoft Partner with access to Microsoft PartnerSource: https://mbs.microsoft.com/partnersource/deployment/documentation/howtoarticles/presalesdemokitmdax2009.htm?printpage=false&stext=AX 2009 VPC

If you have access to the Microsoft CustomerSource instead:

https://mbs.microsoft.com/customersource/downloads/servicepacks/vpcimageax2009sp1.htm?printpage=false&stext=ax2009 vpc

If you prefer to install MS SQL Server, Dynamics AX 2009, Visual Studio 2008, and all the other required software to follow all the examples in this book, you should take a look here to find the standard system requirements for Dynamics AX 2009:

http://www.microsoft.com/dynamics/en/us/using/ax-system-requirements-2009.aspx

Who is this book for

This book is targeted at developers who are new to Dynamics AX, and at consultants who know the functional side of AX but would like to learn how AX works behind the scenes. Experienced AX developers might also pick up some good pointers here and there.

Conventions

In this book, you will find a number of styles of text that distinguish between different kinds of information. Here are some examples of these styles, and an explanation of their meaning.

Code words in text are shown as follows: "You can find information about global functions here such as strlen()."

A block of code is set as follows:

static void HelloWorld(Args _args)
{
  print "HelloWorld";
  pause;
}

New terms and important words are shown in bold. Words that you see on the screen, in menus or dialog boxes for example, appear in the text like this: "Under the Development tab page, you can enable the Sort alphabetically checkbox to sort the properties alphabetically".

Note

Warnings or important notes appear in a box like this.

Tip

Tips and tricks appear like this.

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 send an email to , and mention the book title via 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 .

If there is a topic that you have expertise in and you are interested in either writing or contributing to a book on, 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.

Tip

Downloading the example code for the book

Visit http://www.packtpub.com/files/code/7306_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 content, mistakes do happen. If you find a mistake in one of our books—maybe a mistake in the text or the 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 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 if you are having a problem with any aspect of the book, and we will do our best to address it.