Search This Blog

Friday, 3 October 2014

Execute MenuItems Through Code

Hi ,

Today I would like to share some syntax which is used to execute MenuItems through code

They are three types of Menuitems in AX:

1)Display - Which represents Forms
2)Output - Which represents Reports
3)Action - Which represents Class

Menu Items are represented by the MenuFuction class

Syntax :

MenuFunction menuFunction;
  
menuFunction = new MenuFunction(menuItemDisplayStr(MyDisplayMenuItem), MenuItemType::Display);
menuFunction.run();
 
 
MenuFunction menuFunction;
  
menuFunction = new MenuFunction(menuItemOutputStr(MyOutputMenuItem), MenuItemType::Output);
menuFunction.run();
 
 
MenuFunction menuFunction;
  
menuFunction = new MenuFunction(menuItemActionStr(MyActionMenuItem), MenuItemType::Action);
menuFunction.run();
  

No comments:

Post a Comment