Here is the code to open menu item through code in ax 2012.
void clicked()
void clicked()
{
Args args = new Args();
super();
//args.record(dev_UserMapping);
new MenuFunction(menuitemOutputStr(OutputMenuItemName),
MenuItemType::Output).run(args);
}
Thanks for comments.....