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

TFS interaction with models and layers


An element, such as a table, is stored down at the field level. Changes to a field will only place that field in the current layer. This also means that the same table can have two different fields in different models in the same layer. When we export a model, it will only export the changes within that model; any fields that are in the model will not be exported. This is by design, and has many benefits when deploying a release or applying a hotfix.

TFS integration is file-based and works by AX, exporting an XPO of each element to the local repository when the element is saved. The link between the file and AX is held at the element level, as shown in the following example from our local development environment:

\Data Dictionary\Tables\ConFMSVehicleGroup maps to C:\Projects\VCS\AX\6015GettingStarted\ConFleetManagement\Data Dictionary\Tables\ ConFMSVehicleGroup.xpo.

Even though the resulting XPO will only contain the changes, it means the changes in the layer, not the specific model.

To demonstrate what happens with version control when we add a field to an element in a different model, follow these steps:

  1. Check out the ConFMSVehicleGroup table.

  2. Add a new field to this table by dragging the CustAccount EDT onto its Fields node.

  3. Save the table and ensure that the new field's model is USR Model.

  4. Check in the table.

Open the XPO for the table under the ConFleetManagement model's folder structure, and you'll see that the new field will be there. The folder structure for USR Model will not contain the element at all.

This means that an element must only be in one model—we must not have fields, methods, or controls in different models in the same layer. This is good practice and should not be considered as a limitation.

In terms of layers, there is a technical limitation where elements under source control must not also be modified in a higher layer. For example, if we are working in the VAR layer, the same object must not also be in the USR layer. This shouldn't pose a practical problem in normal deployment procedures.

For example, where the VAR has vertical solutions or add-ons, they should be brought in at the lowest layer possible (ISV or VAR), and the modifications made under source control should be made in the layer above that, such as the VAR or CUS layer.

If the customer also has an internal development team working on a separate functionality set in a separate layer, such as the USR, their environment will be built from the partner or ISV supplier models, and when ready for deployment, they will move their model to the build server.