Adding new feature to context menu for AOT objects in AX 2012Continue reading
Sometimes there is a need to add new feature to standard context menu. Let’s assume that we want in a quick way change the developer’s startup project.
Instead of manual changing it in Tools->Options form, we would like have a possibility to setup it when we right click over the project’s object in Projects window. This could be done in a few steps described below.
Create the class with the feature’s code. To make a solution bit a flexible let’s assume that updating the startup project will be first of several additional features.
Prior to creating class we will create the base enum for menu items:
ANG_ContextMenuItem with element UpdateStartupProject:
Now let’s create the class ANG_ContextMenu with method openStartupProject:
public static ANG_ContextMenu construct()
return new ANG_ContextMenu();
public static void main(Args _args)
ANG_ContextMenu contextMenu = ANG_ContextMenu::construct();
if (_args.parmEnumType() == enumNum(ANG_ContextMenuItem))
public void run(Args _args)
case ANG_ContextMenuItem::UpdateStartupProject :
private void updateStartupProject(Args _args)
contextMenu = _args.parmObject();
treeNode = contextMenu.first();
startupProj = treeNode.treeNodeName();
setting StartupProject = startupProj
where userInfo.id == curUserId();
Create the menu item ANG_UpdateStartupProject for the feature with the properties as is displayed below:
Add the menu item to SysContextMenu menu:
So now it could be visible in context menu:
In the SysContextMenu class we need to modify method verifyItem() to prevent running the feature for other types of AOT objects. We can achieve this by adding below code to the last switch clause in the method:
if ( firstNode.handle() == classNum(ProjectNode) && //Only launch from project node
So now we have a new menu item in context menu with possibility to add other usable features in a simple way.
Implementing a new ERP system in an organisation is always a challenge. Users question whether they will be able to cope with analysing the data flow in an integrated system without external support. The accountant wonders whether all the set-up accounts are correct. The chief technologist cannot get rid of troublesome thoughts about whether the routings and boms are set up optimally. This is why it is so important to have a reliable service team to help the company control the system in the post-implementation stage. In this article, we take a look at the issues surrounding the implementation of an ERP system and the benefits of maintaining proactive service support.
328.77 million terabytes of data are generated every day - this is the estimate for the first quarter of 2023 (1). These are massive amounts of data on a global scale. On a smaller scale, such as an enterprise, it's difficult to estimate because it depends on the organisation in question, but one thing is certain - collecting, processing and analysing this data is the key to business success today. Why is the Data Lake service so important for data analysis and reporting in Microsoft Dynamics 365 Finance and Operations? How can you tame the data by integrating Microsoft Power BI analytics with Data Lake? We have drawn up some tips.
The retail industry is still dealing with the effects of the pandemic that lasted almost three years. In addition to this, further global events are causing disruption to the supply chain or financial stability of many retailers globally. As the industry confronts new challenges shaped by economic and geopolitical factors, it also faces trends influenced by changing customer expectations and needs. Here are 5 developments and trends to watch.
An interactive, AI-powered support for sales, customer service, marketing, and supply chain - Microsoft Dynamics 365 Copilot leverages generative AI and natural language processing technology to perform simple, yet time-consuming daily tasks that workload employees but can be automated.