Skip to main content
Question

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

  • April 21, 2022
  • 6 replies
  • 904 views

Forum|alt.badge.img+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

Shawn Burt
Jr Varsity I
Forum|alt.badge.img+1
  • Jr Varsity I
  • April 22, 2022

[PXButton(DisplayOnMainToolbar=false)]

 

The above attribute should do what you need


Naveen Boga
Captain II
Forum|alt.badge.img+19
  • Captain II
  • April 22, 2022

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

 

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

 

 


Chris Hackett
Community Manager
Forum|alt.badge.img
  • Acumatica Community Manager
  • April 28, 2022

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


Forum|alt.badge.img+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”

 


Naveen Boga
Captain II
Forum|alt.badge.img+19
  • Captain II
  • April 30, 2022

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.

 


Chris Hackett
Community Manager
Forum|alt.badge.img
  • Acumatica Community Manager
  • June 8, 2022

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