Solved

Visibility and location of action menu items


Userlevel 2
Badge

Hello,

There are two areas that I have questions about:

1) My existing code logic locates my two action menu items "CREATE CUSTOMER TEST" and "CREATEVENDOR TEST" in the "Other" section of the "dot dot dot" menu (below). How can I relocate those menu items to the "Record Creation" section?

2) The same code that adds the action menu items to the "dot dot dot" menu also adds the two menu items to the main toolbar menu.
Is there a was to hide the menu items so that they are not visible on the main toolbar menu but still visible in the "dot dot dot" menu?

Thank you in advance.

Ken Severud

 

 

My code behind:

 

 

icon

Best answer by Naveen Boga 8 July 2022, 12:34

View original

3 replies

Userlevel 7
Badge +17

Hi @kseverud34  You can do this in below two ways.

  1. You can add the below line at the code level for the action.

 public PXAction<SOOrder> TestButton;
        [PXUIField(DisplayName = "Test Button", MapEnableRights = PXCacheRights.Select, MapViewRights = PXCacheRights.Select, Enabled = true)]
        [PXButton(IsLockedOnToolbar = true)]
        public virtual IEnumerable testButton(PXAdapter adapter)
        {
        }

 

  1. We can also display the button the Toolbar from the workflow automation steps 

 

 

Userlevel 2
Badge

Thank you Naveen!

-Ken Severud

Userlevel 6
Badge +3

I have this EXACT question.  The solution by Naveen worked to get rid of the button from the main toolbar.  I find that IsLockedOnToolbar = true seems counter intuitive.  Seems like it should be false.  If you set it to false, it doesn’t show up anywhere.  I never would have thought to set it to true.

I added a tweak to the code to add my button to a custom category as follows:

[PXButton(IsLockedOnToolbar = true, Category = "Attach Quote for ESign")]

 

Reply


About Acumatica ERP system
Acumatica Cloud ERP provides the best business management solution for transforming your company to thrive in the new digital economy. Built on a future-proof platform with open architecture for rapid integrations, scalability, and ease of use, Acumatica delivers unparalleled value to small and midmarket organizations. Connected Business. Delivered.
© 2008 — 2024  Acumatica, Inc. All rights reserved