Sunday, January 31, 2016

List of AX 7 courses available at partner source (as of 31 Jan 2016)


List of AX 7 courses available at partner source as of 31 Jan 2016:




















Microsoft Dynamics AX 7 terms - Element, Project, Model, Package, Solution and their relations

In this post I am going to cover basic terms of Dynamics AX 7 development.


Element: Element is the object in the AOT(Application Object Tree) such as tables, classes, forms etc.


Project: Project is a small, manageable group of elements. If you want to customize the element, it needs to be added to the project. Project always belongs to only 1 model. We can use project files to import/export between different instances of AX. It is saved as .AXPP file.   


Model: Model is defined as collection of elements that represent a distributable software solution. This included all the elements and the Metadata. Model belongs to only 1 package. You can modify elements belonging to same package where the model belongs. Model is a unit of development/customization.


Package: Package is a deployable container. It contains source files (XML files), resources and DLLs. It is similar to Model store of AX 2012. You can select one or more packages and create a deployable package, which can be used to move the code from one environment to other. Packages are stored under c:\packages folder. For every model new sub folder will be created under package folder. Package is unit of deployment.


Solution: Solution is a virtual grouping of projects in Visual Studio. In Visual Studio you can add project from same or different models from one or more packages.

Following is the diagram showing this structure.
  • Element is a part of project.
  • One element belongs to only one model and can be customized only in that model once.
  • Project is a part of model.
  • Model Can have many projects.
  • Package contains one or more models.
  • one model belongs to only 1 package.
  • Solution is Visual studio solution which can contain models from different packages.
  • Solution is Virtual grouping created for ease of managing the development objects.  
Following is the screenshot from the Visual studio:


Above solution has multiple models from different packages.
Models are of both customization models as well as extension models.



Above screen shows each model and corresponding packages.





Monday, January 25, 2016

Creating and deleting the model from Microsoft Dynamics AX 7


In my last post, We got our AX 7 VM. In this post I am going to explain how to create a model.
To create a model, We have to navigate to 'Dynamics AX 7' menu -> Model Management -> Create Model..


This will open up a wizard for creation of model.
Now In AX 7, there are 2 approaches for the development.

  • Extension approach -> This is the recommended approach. It creates separate assemblies for the elements of the model. Advantage is that it requires virtually no upgrade efforts when new product versions are released. But it has some limitations, We will discuss those in later posts 
  • Customization approach -> This is similar to over-layer approach which is followed in AX 2012 or earlier versions. It will update the same assemblies in the same package. When it comes to upgrade, this requires quite a lot of efforts 

Model creation for extension approach

When you are creating a mode, you need to decide which approach you are going to take. Let see how to create extension model first.
When the wizard is opened, you have to provide Model Name, publisher, Layer, Version, Description and ModelDisplayName(This will be shown everywhere in the visual studio).



I Prefer to keep the name as <Model>Extension. Here I am creating extension model for Application Suite.
Click Next.

Select whether to create model as an existing package or create new package. For Extension approach, you will have to select create new package. Click next.

Select the referenced packages. It is important to reference appropriate models. You can create extensions of the elements which belongs to these selected packages.
There are 2 approaches for models here.
  • You can create extension model per original model. For example ApplicationSuiteExtension model for ApplicationSuite and LedgerExtension for Ledger Model
  • You can create one extension model for all the extension objects. For example VINExtension model for both ApplicationSuite and Ledger model. In this case you reference to all models from which you need elements.
I personally prefer creating extension model per original model. Here I am selecting Application Suite model as reference model. (I could not select Application Platform in this form, there is option to update model later. In that option you can change the referenced models)

Review the summary screen and click on Finish. If the Create new project checkbox is checked, New screen for creating new project will be launched.

Give name to project same as model (recommended). Either create a new solution or you can add project to existing solution.

This will create new project. Now you can add elements to project and start customization.

Model creation for Customization approach:

When the wizard is opened, you have to provide Model Name, publisher, Layer, Version, Description and ModelDisplayName(This will be shown everywhere in the visual studio).


I Prefer to keep the name as <Model>Custom. Here I am creating customization/overlayer model for Application Suite.
Click Next.



Select whether to create model as an existing package or create new package. For customization approach, you will have to choose select existing package. Click next.


On this step you will see the difference. When you create new package, you get option to select the reference models, but when you add to existing package, you do not get to select the reference packages. As you see in the above screenshot, there are few reference packages already selected. I guess these are same as the original model which created this package. Finish the review and click on finish



Give name to project same as model (recommended). You have to create new solution here which is different from our first project where we had option to use the existing solution.

This will create new project. Now you can add elements to project and start customization.

In AX7 there is no database for the model. Model and elements are stored in XML format in the file system. These new models will be created under C:\Packages
For extension model, New folder is created under Packages folder. But for Customization model, new folder is created under the existing package.

Description of each model is stored under the Descriptor folder.


It is good to know these details, but refrain from making any changes to these files directly. You should always edit from Visual studio.

Deleting model:

I could not find any way to delete the model from Visual studio but you can directly go into the explorer and delete following things:
  • Solution created for the project(model)
  • For Extension model, Package folder created for that extension model.
  • For Customization model, folder created for the model under existing package and the descriptor xml file for the model.
Beware that I could not find any documentation anywhere but found it via experience. This may not be correct way and it may create unexplored problems

P.S.: When you look the model structure under Application suite, it is different from the rest of the models. This needs to be further studied more. This is tried on AX 7 CTP 8 version.