Executing form menu item through code in MSD axapta


 new menuFunction(menuItemDisplayStr(CustTable), MenuItemType::Display).run();  

Here the form CustTable is called using the display menu item CustTable. The form will only be loaded if the user has been granted permissions to the CustTable form. The method run() executing the menu item has the class Args as parameter. For example you can use Args to pass a parameter to the called object for filtering data.