This post is machine-translated. The original post in german language can be found here.
These post applies to following version:
Dynamics AX 2012
Dynamics AX 2012
|
|
|
|
|
|
This post is machine-translated. The original post in german language can be found here.
These post applies to following version:
Dynamics AX 2012
|
Some years ago I had already written an article about the class EditorScripts. This is the one with which you can easily extend the functionality of the X++ editor.
For example, you can easily extend the context menu of the editor by creating methods in the class.
These methods only have to meet a few criteria, such as
Which further criteria the method must fulfill can be read in the method EditorScripts.isApplicableMethod().
If these criteria are met, you can even control the menu structure by naming the method, using the underscore "_" as a separator.
The following method would, for example, create a MyExtensions submenu with an Example entry.
Nested submenus are also possible:
Furthermore, the naming of the method indirectly defines a keyword which can be used in the editor similar to FOR, WHILE, SWITCH,... in combination with the tab key.
The keyword is the one after the last _ of the method name.
In the following example, "devVersion" (case-sensitive) would be the keyword.
The method EditorScripts.isApplicableMethod() mentioned above can also be used to control when a method should be offered.