Axaptapedia is now maintained by AgileCadence For more information please click here.

Context menu

From Axaptapedia
Jump to: navigation, search
Adding a new context menu item

It is possible, with little effort, to modify the context menu which appears when right-clicking inside Axapta.

Simply create a menu item for the desired functionality, and add it to the sysContextMenu menu in the AOT.

Now when you right-click, you will find your additional option under the Add-Ins sub menu.

Filtering add-ins per object type[edit]

It's also possible to show the new item for certain types of objects. To do this you have to modify the method verifyItem() in the class SysContextMenu or one of its derived classes. This method returns a boolean to indicate if a menu item should be displayed.

Inside the method is a huge select statement to handle specific menu choices. E.g. if you created a new add-in work on reports only, add the code below.

   case menuItemActionStr(myItem):
       return (!docNode && firstNode && _firstType && _firstType == UtilElementType::Report);