Showing posts with label development. Show all posts
Showing posts with label development. Show all posts

Wednesday, 11 January 2017

Dynamics AX 7 Development I – Create a model

With the recent release of AX7 CTP8 public preview there are a lot of things to learn. I thought I would do some basic series of tutorials to explain a few concepts and how to get around for developers.
In this first one I will explain how to create a model.

Click on Dynamics AX > Model Management > Create model

image_thumb12

Follow the wizard by entering a name and a publisher

image_thumb4

This is very important if you want to create extensions or if you want to customise existing functionality by over-layering (which we try to avoid as much as we can).

image_thumb6

After you finished you can create a new project in that model.

image_thumb8

In the Application Explorer there are two views
  • Model View – Shows the AOT divided into its models. Each model has its own subset of the AOT (elements that belong in the model)
  • Classic View – Shows a single AOT classic view we are used to
You will notice in the Packages folder that the model folder was created under the application suite.

image_thumb13

Good reference material available under the wiki site

Dynamics AX 7 Development I – Create a model

With the recent release of AX7 CTP8 public preview there are a lot of things to learn. I thought I would do some basic series of tutorials to explain a few concepts and how to get around for developers.
In this first one I will explain how to create a model.

Click on Dynamics AX > Model Management > Create model

image_thumb12

Follow the wizard by entering a name and a publisher

image_thumb4

This is very important if you want to create extensions or if you want to customise existing functionality by over-layering (which we try to avoid as much as we can).

image_thumb6

After you finished you can create a new project in that model.

image_thumb8

In the Application Explorer there are two views
  • Model View – Shows the AOT divided into its models. Each model has its own subset of the AOT (elements that belong in the model)
  • Classic View – Shows a single AOT classic view we are used to
You will notice in the Packages folder that the model folder was created under the application suite.

image_thumb13

Good reference material available under the wiki site

Tuesday, 15 March 2016

Dynamics AX 7 Development 2 – Create a new table

In continuation with my regular AX posts on development basics. In this post I will describe how to create a new table. I won’t go into detail about best practices/indexes/relationshipts etc. Just a basic table creation.
Right click the project > Add > New item
2016-01-11_1519
Create an EDT and give it a name.
2016-01-11_1522
Now drag the EDT tot he Fields section in the table design.
2016-01-11_1525
On the project property make sure to tick the “Synchorinse Database on Build”
2016-01-11_1524
Now build your project. This will build the code and synchornise the table to the database.
Right click and open in table browser. This will open up a window with all the table fields.
2016-01-13_0850

Dynamics AX 7 Development I – Create a model

With the recent release of AX7 CTP8 public preview there are a lot of things to learn. I thought I would do some basic series of tutorials to explain a few concepts and how to get around for developers.
In this first one I will explain how to create a model.
Click on Dynamics AX > Model Management > Create model
image_thumb12
Follow the wizard by entering a name and a publisher
image_thumb4
This is very important if you want to create extensions or if you want to customise existing functionality by over-layering (which we try to avoid as much as we can).
image_thumb6
After you finished you can create a new project in that model.
image_thumb8
In the Application Explorer there are two views
  • Model View – Shows the AOT divided into its models. Each model has its own subset of the AOT (elements that belong in the model)
  • Classic View – Shows a single AOT classic view we are used to
You will notice in the Packages folder that the model folder was created under the application suite.
image_thumb13
Good reference material available under the wiki site

Dynamics AX 7 Development I – Create a model

With the recent release of AX7 CTP8 public preview there are a lot of things to learn. I thought I would do some basic series of tutorials to explain a few concepts and how to get around for developers.
In this first one I will explain how to create a model.
Click on Dynamics AX > Model Management > Create model
image_thumb12
Follow the wizard by entering a name and a publisher
image_thumb4
This is very important if you want to create extensions or if you want to customise existing functionality by over-layering (which we try to avoid as much as we can).
image_thumb6
After you finished you can create a new project in that model.
image_thumb8
In the Application Explorer there are two views
  • Model View – Shows the AOT divided into its models. Each model has its own subset of the AOT (elements that belong in the model)
  • Classic View – Shows a single AOT classic view we are used to
You will notice in the Packages folder that the model folder was created under the application suite.
image_thumb13
Good reference material available under the wiki site

Dynamics AX 7 Development 2 – Create a new table

In continuation with my regular AX posts on development basics. In this post I will describe how to create a new table. I won’t go into detail about best practices/indexes/relationshipts etc. Just a basic table creation.
Right click the project > Add > New item
2016-01-11_1519
Create an EDT and give it a name.
2016-01-11_1522
Now drag the EDT tot he Fields section in the table design.
2016-01-11_1525
On the project property make sure to tick the “Synchorinse Database on Build”
2016-01-11_1524
Now build your project. This will build the code and synchornise the table to the database.
Right click and open in table browser. This will open up a window with all the table fields.
2016-01-13_0850

Dynamics AX7 Development 3–Create a new form

Lets have a look at creating a form. This is probably a little more exciting than the previous posts. As this is totally new to AX7.
Right click and Add > New
Select the Form object from the AX7 Artifacts
2016-01-14_1558
Initially it will show the pattern as unspecified. This is something we should always set if we expect our form to work across platforms (browsers). Otherwise we can set it to custom and it is free form. Which is a bit messy and unsupported.
2016-01-14_1600
Right click the Design and apply a pattern.
2016-01-14_1601
Once you have applied a pattern the bottom part of the form will show you the expected pattern. Now it is a matter of filling it up with the required control types.
Lets right click New > control we want to add.
2016-01-14_1608
Once you have added all your required controls.
Drag the table from the AOT to the Data Sources node. It should look something like this.
2016-01-14_1611
Now you can preview by clicking the tab.
2016-01-14_1613
Build your VS project. There should be no errors.
If you want to debug and run in a browser. Make sure to set the object as your Start Object.
2016-01-14_1614

Dynamics AX7 Development 3–Create a new form

Lets have a look at creating a form. This is probably a little more exciting than the previous posts. As this is totally new to AX7.
Right click and Add > New
Select the Form object from the AX7 Artifacts
2016-01-14_1558
Initially it will show the pattern as unspecified. This is something we should always set if we expect our form to work across platforms (browsers). Otherwise we can set it to custom and it is free form. Which is a bit messy and unsupported.
2016-01-14_1600
Right click the Design and apply a pattern.
2016-01-14_1601
Once you have applied a pattern the bottom part of the form will show you the expected pattern. Now it is a matter of filling it up with the required control types.
Lets right click New > control we want to add.
2016-01-14_1608
Once you have added all your required controls.
Drag the table from the AOT to the Data Sources node. It should look something like this.
2016-01-14_1611
Now you can preview by clicking the tab.
2016-01-14_1613
Build your VS project. There should be no errors.
If you want to debug and run in a browser. Make sure to set the object as your Start Object.
2016-01-14_1614

Dynamics AX7 Development 6–Adding Delegates for Customised Code in Higher Package

Dynamics AX is split into multiple models the main ones are as follows; Application suite, Application Foundation and Application Platform.
2016-01-20_1256
If you look at some of the debendencies you see how the organization of model affects the assemblies (how it is compiled).
In some cases you have to modify the Foundation or the Platform. The issue with that is you are unable to reference code sitting in a higher package (model). In short a higher model can take dependencies and access elements in a lower model but not the other way around.
To get around this limitation you have to use a delegate method. Below is an example of a delegate. The PrintMgmtDocType has a method to get the default report form.
2016-01-29_0612
See how the delegate method is called from the Foundation and uses an EventHanderResult to pass around the result.
2016-01-29_0610
The delegate method doesnt have to have any code. It is there to allow other methods to subscribe to it.
2016-01-29_0611
Now this is the calls in the Suite. Notice how to subscribe by adding the SubscribesTo attribute.
2016-01-29_0623
Refer to the Microsoft Wiki. It has some really good examples.