Question

Hide action button on toolbar that's added on the form level

  • 22 April 2022
  • 6 replies
  • 512 views

Userlevel 2
Badge +1

 

I thought I’d done this before, but I cannot figure it out at the moment.  My action button I added to my form on my custom screen is also showing on the toolbar.  See my screenshot below.

I tried setting the visible property to false on the PXUIField attribute, but that removed the button from both locations.  I also tried setting the visibility property to invisible, but that did not seem to make a difference.  I hope I’m overlooking something simple.

 

 


6 replies

Userlevel 5
Badge +1

[PXButton(DisplayOnMainToolbar=false)]

 

The above attribute should do what you need

Userlevel 7
Badge +17

@scottstanaland12  You can add PXDSCallbackCommand at .aspx page like below to make the button hide on the Toolbar 

 

 <px:PXDSCallbackCommand Name="ButtonName" Visible="False" />

 

 

Userlevel 7
Badge

Hi @scottstanaland12 have you been able to resolve your issue? Thank you!

Userlevel 2
Badge +1

Sorry for the delayed response.  I’m still unable to get the button to only show on the form.

I tried @Shawn Burt suggestion, but I’m getting a syntax error when I try to add “DisplayOnMainToolbar” on the PXButton attribute.  Maybe it’s version related?  We are still on 2020 R2.

When I try to add the PXDSCallbackCommand to the call back commands as @Naveen Boga suggested I get an error that “An entry with the same key already exist”

 

Userlevel 7
Badge +17

Hi @scottstanaland12  I think that the below issue is not with the above.

 An entry with the same key already exists.

I think some other code is causing this issue.

 

Userlevel 7
Badge

Hi @scottstanaland12 were you ever able to resolve your issue? Thank you!

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