AX7: Create new package\model

To create a new package\model on AX first you should understand the concept of Packages and Models on AX7, click here to see the MS wiki tutorial or use this video.

On VS go to the menu Dynamics AX 7\Model Management\Create model…:

CreateModel1

Setup  your model parameters:

CreateModel2

Obs: If you want to create a model inside an existing package I advice you to identify that on the Model Name and on the Model display name. This will help you when you are selecting and using your model on your project. Example: If you want to create a new model on Application Suite, I would name it as “NewModel (Suite)” and use the same on the “model display name”.

Select if you want to create a new Package for the new model or if you want to create the model under an existing package.

CreateModel3

If you choose “Create new package” remember that with this option you will be able to just extend element from referenced packages. If you need to customize I advice you to create 2 Packages:

  • A new package for your elements and extensions.
  • A new model inside “Application Suite” for example to do customization (SalesTable form). Don’t forget to make your new package as referenced package to this model, so you will be able to access your element on the customization model, ex: new tables.

Select the referenced models for your new model.

CreateModel4

Usually you will need to select the models Platform, Foundation and Suite. Don’t worry if you forget some model because you can update your model using the Dynamics AX 7\Model management\Update model parameters…

If you want to use this model as a Unit Test and Automated Test model, select the references to Test Essentials and the Form Adaptor model related to the model that you want to test.

Finish your model creation and select the extra options to “Create new project” and “Make this my default model for new projects” if you prefer.

CreateModel5.PNG

To see all models dependencies, go to “Dynamics AX7\Model management\View package dependencies”.

CreateModel6

 

 

AX7: Create new package\model

6 thoughts on “AX7: Create new package\model

  1. daxappusr says:

    I have created a Model, by selecting a new package option, same as shown in your screenshots.
    Now I am trying to add an element for Extension, but “Create Extension” option is disable.
    Can you please, specify what are necessary things, to enable “Create Extension” .

    Like

    1. To create extension to your new package, the package of the element that you are trying to extend has to be “referenced” on your package.
      What you need to do is, take a look on the element that you are trying to extend, take note of what is the package that the element belongs and update your package to have the referenced package linked to that one.

      Like

  2. DAXAPPUSER says:

    Thank you very much for your reply. I got my mistake that was Element was set to IsExtensible=False.
    So, point is, if an element is set to IsExtensible=False and lets say element belongs to Application Suite (Package), should be forcefully change it to IsExtensible=true, before making a n d extension?
    Does it support making IsExtensible=true, forcefully?

    Like

    1. There is 2 ways, you can do that or just customize that element. Maybe in the future MS will change that element to be extensible, but until that extension it’s not supported and with that property MS are telling you that you should go to customization if you need to that something with that element. To extend that element you will have to customize first and then create the extension for it. I advise you to analyse if that element really need to be customized and evaluate if you do customization what would be the effort to support the MS updates and if you change to be extensible what would be possible problems with that element too.

      MS highly advise to use customization as minimal as possible, because the plans are to release update more often.

      Like

Leave a comment