Solved

Assigning Action to a custom Button and UI layout issue

  • 28 July 2022
  • 2 replies
  • 559 views

Userlevel 2
Badge

I ran into two issues while working on the UI of the form:

  1. I have created an Action but I can't seem to assign it to the new button that I've created. It appeared on toolbar instead as highlighted in red box as shown below:

 

The code on the Action and Button:

 public PXAction<CashAccount> RefreshAvailability;
[PXButton(CommitChanges = true)]
[PXUIField(MapEnableRights = PXCacheRights.Select, MapViewRights = PXCacheRights.Select, Enabled = true)]

protected virtual void refreshLCAvailability()
{
//logic here
}
  1. I inserted two Column controls to separate the fields into two columns as shown in the image below but the output is not like what I wanted it to be as shown in blue box in the first image.

 

I feel like I'm missing something very simple but can't seem to figure it out.

icon

Best answer by ericklasimin61 8 August 2022, 05:59

View original

2 replies

Userlevel 2
Badge

The first issue has been solved by assigning the Command as well as the Target as shown below:

 

I have yet to solve the second issue.

Userlevel 2
Badge

I managed to solve the second issue by trial and error. So basically, you need to:

  1. Insert an Empty Layout control after Merge control
  2. Specify the Merge property as False
  1. Insert another Column in between the two
  2. Insert a Label control in the newly created Column
  3. Leave the Label Text as blank

 

It is mind boggling that I have to do it in this roundabout way. If there is any better way of doing this, please do share it in this thread.

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