Book Image

Mastering Microsoft Dynamics AX 2012 R3 Programming

By : Simon Buxton, Mat Fergusson
Book Image

Mastering Microsoft Dynamics AX 2012 R3 Programming

By: Simon Buxton, Mat Fergusson

Overview of this book

<p>Due to its interesting capabilities such as finance and supply chain management, business intelligence and reporting, project management, and so on, Microsoft Dynamics is one of the most widely used solutions adopted by many organizations across the globe. This book is a step-by-step tutorial that covers elements from the initial design through to development. Each concept is fully explained and demonstrated by the creation of a real-world project. You will learn some really useful, advanced development techniques such as extending your code with metadata and exception handling.</p> <p>This book is an invaluable tutorial if you are moving from another ERP system or language, or if you are a technical consultant with a desire to create efficient functional designs and business solutions.</p>
Table of Contents (21 chapters)
Mastering Microsoft Dynamics AX 2012 R3 Programming
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Index

Building the solution


There are many scripts to help us build the solution, which can be very complicated. To get us started, the following scenario can work well for many implementations.

In this scenario, we have several developers working on a solution for the VAR, and a team of two working on security and reports in the USR layer.

The customer's environment consists of the following:

  • A shared development server or a VM for each developer

  • A build sever

  • A test server

  • The production or live server farm

The VAR's environment will consist of these:

  • A virtual machine for each developer (and also per customer they are working)

  • A build server, which also acts as a unit test machine

The process starts at the VAR when all developers have checked in the code-complete unit tested code. The following steps cover the general process:

  1. The build server at the VAR will be rebuilt from an AX 2012 VM template of the correct service pack level.

  2. It will then be configured to link to the TFS repository.

  3. The developer will then navigate to Version Control | Synchronise, check Force in the dialog, and press OK.

  4. This will be repeated for each model.

The models will then be exported and delivered to the customer's site. At the customer's site, the following steps are performed:

  1. The customer's build server will be refreshed from live (using database backup and restore for at least the model store database, and the business database too if policies allow).

  2. The models will be installed from the VAR.

  3. If using version control, one developer will synchronize his/her virtual machine with source control.

  4. The models will be exported from the developer's VM or the shared development environment.

  5. The models are then imported into the build server and then fully compiled.

  6. The test server will be refreshed from live using database backup and restore of both the databases (the baseline is not relevant for this).

The model store can now be moved to test in its entirety. This is because the build server was refreshed from live, and therefore, the element IDs will match the live server. Importing models will only create element IDs if they don't already exist. Once we have performed our user acceptance test in test, it can then be deployed in live.

This is a simplistic method, which avoids the use of build scripts. Build scripts may seem complicated, but once they are set up, the whole process can be automated. The following material is useful for more detail on the best practices with source control as well as for creating your own automated build process: