Thursday, November 17, 2016

AX2012 invoke menuitem using X++ code

Below is the code to invoke a menu item on a click on command button.

The command button was required to execute some x++ code and then trigger the menu item, hence the menu item was not directly inserted as menu option instead the code was written on the click event.

   Args    _args = new Args();   

    new MenuFunction(identifierstr(STPLedgerBalanceCurrencyTranslation), MenuItemType::Action).run(_args);

No comments: