what code is executing for F12 Function in X++ editor in Ax

F12 function we are using to open object definition.
I am looking for the code to perform this task.
I need to write a x++ editor script open the object in a new window. Actually we are performing this with the help of F12 but this is not working for all cases.
For example, in x++ code like this
new MenuFunction(menuitemdisplaystr(AbatementCertificate_IN), MenuItemType::Display).run();
when we click F12 on “AbatementCertificate_IN” it should open display menu item since it is using as display menu item in the above code but here it is opening the class existing with the same name.
So I am looking for F12 function code to extend this functionality to open the object in all case through editor script.

Appreciate your reply.


The X++ editor in AX 2012 is the editor from Visual Studio, i.e. a WPF control and a lot of .NET code. It means won’t ever find any X++ code to change. But you can use VS extensibility model to write some extensions.

Thank you Martin for your reply.

I have extended the functionality by using Editor script class.