Friday, 17 February 2017

Get started developing in AX 7



This blog will show how you can start making a customization in AX 7 by showing you the steps needed to make a simple script
Before starting customizing AX it is recommended to create your own Model
  • The first step is to log into Visual Studio as an Adminstrator
Dev1
Once within Visual Studio, go to the AX7 menu and select Model Management and ‘Create model’. A model is not exactly the same as a layer, but it might be a useful analogy to think of it as being similar to a layer in the sense, it is a way to isolate and manage your customizations
Dev2
Create the model in the form that appears and fill out the fields as appropriate

Dev3
Click ‘Next’ and select ‘Existing package’ and choose ‘Application Suite’

Dev4
Press ‘Next’ – accept the default values suggested and press ‘Finish’


Dev5
In the ‘Save’ screen that appears, select the project DynamicsAX7 and give it a name of your choice and press ‘OK’
Dev6
Notice in the Solution Explorer to the right in the screen a new Project has been created in your newly created Model

Dev7
On the Solution Explorer go to the project and rightclick and select ‘Properties’
Dev8
In here note that the project is in the new Model just created and that the customizations will be saved in the ‘USR’ layer
Dev9
Also, it’s a good idea to specify which company you wish to execute the code in, here ‘DEMF’
Press OK
 Now to add ‘Runnable Class(Job) to the Project do the following. On the project rightclick and select ‘Add’ and then select ‘New Item’
Dev10

In the screen shat appears select ‘Code’ and then ‘Runable Class(Job)’
Dev11
And press ‘Add’
Note that now in the Solution explorer that the Runable Class has been added
Dev12
Doubleclick on the ‘Runable class’ and enter the code editor window and give your job a meaningful name and write your code like you would do any X++ job as known in previous versions
dev12B
Save the project(Ctrl + S) and to compile the job, select ‘Build’ and ‘Build Solution’ from the toolbar
Dev13b

Wait until the output window reports that the build has completed
Dev14


Now in order to run the job, you need to set it as a ‘Startup Object’
Go to the Solution Explorer and on the Job, righclick and select ‘set as Startup Object’
Dev15
Now to execute the job, select ‘Debug’ in the toolbar and then ‘Start without Debugging’
Dev16
And note the output in the browser
DevFinalOutput

https://blogs.msdn.microsoft.com/axsupport/2016/03/23/get-started-developing-in-ax-7/
And that’s it. Happy AX7 developing !

http://www.slideshare.net/BohdanBilous/ax7-ide-part-i

http://www.slideshare.net/BohdanBilous/ax7-ide-part-i

Microsoft Dynamics® AX 7 Development Basics

Before we talk AX7 Development, we need to have look at few terminologies, which are as under

Element: Element is any Object residing in AOT. E.g. any Base Enumeration, any EDT, any Table, any Form, which you see in AOT Tree, is an element itself.

Model: A Model is a group of elements. A model is collection of elements that represent a distributable software solution.

Packages: A package is deployable unit, which may have multiple Models.

Project: Projects are the logical containers for everything that's needed to build your application. A project can be associated with only one model.

After we know basic terminologies, which will be used very frequently, let’s start with ways of developments AX7 provides.

With arrival of AX7, now we can do development in AX, with two methodologies.

  1. OverLayring
    If you have been developer of previous versions of AX such as AX2012 or AX2009, you don’t need explanation of this way of development. Name of this methodology ‘OverLayring’ is self-explanatory.
    In Microsoft Dynamics AX, a layer system is used to manage elements. The USR layer is the top layer and the SYS layer is the bottom layer, and each layer has a corresponding patch layer above it.
    OverLayring means if you do change/customize any element in upper layer, it will override its definition, in lower layer.
    This is what we were doing till AX2012 to customize AX. It basically allows customization of metadata and source code in higher layer. For example, you can add a new field in CustTrans Table in the user layer or in ISV Layer.
  2. Extension
    It refers to concept of extending existing elements, without overriding those into other layers. That means, elements will not be customized, instead elements will be extended. This approach reduces upgrade cost and conflicts. By creating extension elements, all of the customizations and code are stored in a separate assembly. It only contains the code that was added or changed in the extension file. Since this code resides in a separate assembly, it improves performance and the ability to upgrade and test.