How to: Create New MorphX Development Project Types [AX 2012]
Updated: August 5, 2011
Applies To: Microsoft Dynamics AX 2012 R2, Microsoft Dynamics AX 2012 Feature Pack, Microsoft Dynamics AX 2012
You can create your own project type by extending the ProjectNode system class and adding an enumeration value to the SysProjectType base enumeration.
This feature is used in the standard application to create test projects.
By overriding methods, you can have code executed when a project is created, loaded, saved, exported, and imported. You can also change the icons on specific nodes in the project. By using the loadProject and saveProject methods, you can read and write your own custom data with the project.
Creating New Project Types
To create your own project type, you must create a new class that extends the ProjectNode system class. You must also add an enumeration value to the SysProjectType base enumeration that shares the name of the class that you created.
To create a new project type
Right-click the Classes node in the AOT and select New Class.
Double-click Class1 to open the Code Editor.
In the Code Editor, rename the class MyProjectType and extend MyProjectType by changing the class declaration to the following:
In the AOT, expand the Data Dictionary node, expand the Base Enums node, right-click the SysProjectType base enumeration, and then click New Element.
Name the element MyProjectType. The name must match the name of the class that you created.
Right-click the Shared node in the Projects window and point to New. The MyProjectType project type will be in the menu.
You may have to restart Microsoft Dynamics AX before you can see the changes.