Showing posts with label Property. Show all posts
Showing posts with label Property. Show all posts

Sunday, February 21, 2016

Extension capabilities of AX 7 (in CTP 8) – Menu


In my last post, I had discussed about extension capabilities of Form. In this post I will cover extension capabilities of Menu.

There are many menu extension examples available in AX7.

I will take example of AccountPayable.workspace.




To demonstrate all the capabilities I have created a new extension of Account Receivable menu : AccountsReceivable.FDDXXXExtension
By default when you create an extension, its name will be <ParentObject.extension>. You can rename it as you want.

You can do the following in the AX 7 menuextensions:

Add new submenu:

I have added new submenu VINSubmenuExample to AccountsReceivable.FDDXXXExtension.


Add new MenuItemReference:

I have added new MenuItemReference VINMenuItemReferernceExample to AccountsReceivable.FDDXXXExtension.


In the properties, you define the Menu Item Type, Menu Item Name etc.
Though Show parent module, Display In Content Area properties are available but I could not see any effect of changing those properties.


Add new Seperator:

I have added new separator VINSeperatorExample to AccountsReceivable.FDDXXXExtension.




Though you can add the separator but it doesn't show up in UI.


Add new Menu Element Tile:

Ax 7 has new element called tiles. Example is CustomerInvoiceWorkSpaceTile

I have added new tile VINMenuElementTileExample to AccountsReceivable.FDDXXXExtension.

Add new Menu reference:

I have added new menu reference VINMenuReferenceExample to AccountsReceivable.FDDXXXExtension.



Following screenshot shows, how it looks in UI:











Sunday, February 14, 2016

Extension capabilities of AX 7 (in CTP 8) – Forms

In my last post, I had discussed about extension capabilities of Table. In this post  will cover extension capabilities of forms.

There are many form extension examples available in AX7.

I will take example of SalesTable.Extension.


Searching for element in AX 7 has become very user friendly. I loved the way it works.




To demonstrate all the capabilities I have created a new extension of SalesTable : SalesTable.FDDXXXExtension
By default when you create an extension, its name will be <ParentObject.extension>. You can rename it as you want.
You can do the following in the AX 7 form extensions:

Add new datasource:

I have added new datasource VINExampleTable to SalesTable.FDDXXXExtension.



As you see in the above screenshot, you can see the each new datasource added to the extension in Application Explorer.

Add new controls:

I have added a new string edit control: VINExampleString on overview grid




Change the properties of control:

Only few properties can be changed, they are as follows:

Visible -> Yes/No
Enable -> Yes/No
Lable -> String
Help text -> String


You can copy the pre/post event handlers for Form methods, Event nodes and datasource event nodes. You can not create event handler on form datasource methods.


You can create event handler node on the event nodes of the datasource fields
You cannot create event handler on methods of the datasoure fields.



You can create event handler node on the event nodes of the controls
You cannot create event handler on methods of the controls.






Saturday, February 13, 2016

Extension capabilities of AX 7 (in CTP 8) – Tables

In my last post, I had discussed the Extension capabilities of Base enum. In this post I will cover the extension capabilities of tables in AX 7.

There are many table extension examples available in AX7.

Example of table extension is CompanyImage.Extension

As shown in the above screenshot, For every change of property or node a new XML tag will be created in the underlying XML file.

To demonstrate all the capabilities I have created a new extension of SalesTable : SalesTable.FDDXXXExtension
By default when you create an extension, its name will be <ParentObject.extension>. You can rename it as you want.



When you compile(build) the object you get the compile error as follows:


To solve this you need to create an file CompileError.xml as follows:





You can read more here for the details of the file.

You can do the following in the AX 7 table extensions:


Create new fields

I have created a new string field: VINStringExample.




Create new field groups:

I have created a new group: VINExampleGroup and added my field VINStringExample in it.




Create new index:

I have created a new index: VINExampleIdx. There is a new property available on the index : “Index type”. It can be traditional (row) index and it can column index.




Create new relation:

I have created a new relation: VINExampleRelation. Delete actions are now available on relation itself as shown below.




Create (Pre/Post) Event handler of methods:

I have created a pre even handler for insert method of SalesTable. You need to copy the event handler method. Create new class and paste the event handler code as shown below.



If you go to SalesTable and click on find Event handler you will get the result showing all the event handles created for that method (as below)

Create/Copy event handler method of Event node:

In AX7 we have new node called Event node. There are 40 events available on table.
Similar to pre/post event handler on methods, you have to copy the event handler. Create new class and paste the event handler code as shown below:

P.S. If you create extension for inherited table, Table doesn't sync unless you add the parent table in project.

Saturday, February 6, 2016

Extension capabilities of AX 7 (in CTP 8) – Base enums

In this post I will describing the extension capabilities of AX7.

In AX 7, following elements can be extended:

  • Base Enum
  • Table
  • Form
  • Menu
  • Data Entity
  • Security Duty
  • Security Role
  • Classes
  • Map (Not yet possible in CTP8)
  • View (Not yet possible in CTP8)
I will cover extensibility of each element.

Base enum:

Example of base enum extension is DMFModule.Extension in out of box AX 7.


Not every base enum can be extended. There is a property called IsExtensible  on Base Enum.



Only Enums with this property true can be extended.
In extended base enum you can create new elements.


 Above screen shot shows the corresponding XML file created. You can set the values of following properties:
  • Name
  • Lable
  • Configuration keys
  • Country region codes

You cannot edit the value of element. Though you can change the values in XML but it is not recommended. In next post I will cover Table extensions.