Adding a Custom Button to the Action Bar in Acumatica
Introduction
Customizing the Action Bar in Acumatica allows developers to add custom buttons to specific grids, enhancing user experience and functionality. This guide walks through the process of adding a new action button using C# and ASPX.
Understanding the Requirements
To add a button in the ActionBar → CustomItems section of a specific grid, you need to:
- Define an action in the graph.
- Modify the ASPX page to include the new button inside the ActionBar.
Step 1: Define the Action in the Graph
Start by creating a new PXAction in the graph file:
This defines an action called myCustomAction, which will later be linked to the UI button.
Step 2: Modify the ASPX Page
Now, update the ASPX file to include the custom button inside the ActionBar → CustomItems section:
This configuration does the following:
● Defines a grid (PXGrid) with an action.
● Adds a toolbar button under <CustomItems>.
● Links the button to the graph action via <AutoCallBack Target="ds" Command="ExecuteCustomAction" />.
Step 3: Deploy and Test
- Save the changes to the graph and ASPX file.
- Publish the customization package in Acumatica.
- Verify that the button appears in the expected location.
- Click the button to confirm it triggers the intended logic.
Conclusion
By following these steps, you can successfully add a custom action button to the ActionBar in Acumatica. This approach allows you to extend functionality without modifying the core system behavior.