Showing posts with label Dependency. Show all posts
Showing posts with label Dependency. Show all posts

Thursday, January 14, 2016

How to create a new model in AX 7 depends on AX 7 architecture - packages, models, layers

This article will make more clarify my previous post about extensions and customizations in AX 7.

Purpose of the article: 
1. Understand how to create a new module in AX 7;
2. Understand how packages and layers cooperates with modules in AX 7.


Make your choose 
We have 2 ways to create a new module

1. Create new package (create a new module in a new package);
2. Select existing package (create a new module in a existing package).

Let's take in basic Tax package that includes module Tax in SYS layer. 
As in AX 2012 a module can exists only in one layer.


Create a new module in a new package
Purpose: extends standard Tax functionality by adding a few new reports.


1. Name your model and choose a layer where a module is going to be created


2. Choose "Create new package"


3. Choose packages, which elements you want to use. For our purpose it's "ApplicationPlatform", "Tax" and "TaxFormAdaptor". Don't check any packages that you do not need. In the future, you will have an opportunity to compile whole single package and also whole package with his related packages. So, it will take a long time to make compilation in second case.


4. Check your selected data one more time 


5. Let's check that package and module were created properly. 

Our created project will be linked to a new module in a layer VAR


Also check that folders for package and module were created


In AOT we can find out that new module existed in a new package


Finally we can create a few new reports and deploy whole package to production environment without compilation any other packages. Pretty simple and can be done without any pause in production work, without any risk. In the future we can create a new module in this package and extend this package.



Consuming packages


Packages consumed by



Create a new module in an existing package
Purpose: extends standard Tax functionality by adding a few new reports and make modifications in a standard reports.

Comments to purpose: making modifications in a standard reports (functionality) is a wrong way. Better way is copying of a standard report to our new module and modifying it.

1. Name your model and choose a layer where a module is going to be created


2. Choose "Select existing package" and select Tax package


3. We are not allowed to choose referenced package, because existed package already has referenced packages. You can change referenced packages for existed package late in "Update model parameter" form.

4. Check your selected data one more time 


5. Let's check that module was created properly. 

Our created project will be linked to a new module in a layer VAR


Also check that folder for module was created






In AOT we can find out that new module existed in chosen Tax package. Now we have 2 modules in 1 package - "Tax" in SYS layer (existed previously) and "Tax Reporting (Existing Package)"in VAR layer.


Finally we can create a few new reports in our module and customize existed reports from Tax package. When we will deploy or package to production environment we will destroy the work of Tax functionality during whole deploying process. In the future if MS will make modifications in standard reports that we changed - we will lose our changes while MS update will be finished. 



Consuming packages


Packages consumed by



Let's do the best way development. Thank you for your time.

Sunday, January 10, 2016

Dynamics AX 7 Development - Extensions VS Customization

What is the difference between Extensions and Customization and which of them you should choose for your solution?

Model is a unit of development or customization. Extensions get isolated in their assemblies.




AX 7 introduces a new way of customizing an application by using extensions.



Using of extensions allows you to create new model elements and to extend existing model elements.
Using customization you need to create event handlers and new plug-ins.

Advantages of extensions
  1. You need to manage only your extension artifacts. 
  2. You can service your solutions independently without concerns about other customizations.

Learn more about extensions and customizations in my new post.

Dynamics AX 7 Development - Packages, Models, Projects

Packages, Models, Projects in AX 7. Let's figure out what is it.

Package in AX 7 is independent deployable unit of one or more model.
Model is a group of elements (metadata and source files) that typically constitute a distributable software solution.
Project - simple Visual Studio project that stores AOT elements. The project helps you group the elements.


A simple way to understand is described on image below.


Package are folders located in the model store folder of the AX 7 application. The default model store folder is “c:\packages”.




Model folders are contained in their package folder. A model folder contains type-specific folders.



Every dependency of packages are described in descriptor files and can be shown in AX 7 viewer.



In model view, AE is organized by models. The package that a model belongs to is shown in parenthesis next to the model name.



The main purpose of VS project is to store AOT elements. AX 7 has not Shared or Private projects. Each user has their own projects that each of them related only to one model. Use multiple projects in Visual Studio solution to work with elements from different models.



So, that's way, how Packages, Models and Projects interact with each other.

Learn more about packages, models and layers in my new post.