Solved

Add New Button [ + ] in PXGrid to open new dialog with form for entry and refresh grid upon close

  • 25 June 2022
  • 4 replies
  • 282 views

Can we overwrite the “plus” button to open a dialog with form to enter the details and refresh the grid after close.

 

icon

Best answer by Leonardo Justiniano 27 June 2022, 17:21

View original

4 replies

Userlevel 6
Badge +4

Hi @Kumaran 

 

Normally people create a toolbar button to handle special situations like dealing with a dialog box. Examples of that are everywhere in Acumatica. Example: Sales Orders

Plus button is a basic grid functionality that adds a new line.

Userlevel 7
Badge +17

Hi @Kumaran  Yes, as suggested by @Leonardo Justiniano you can use “ADD ITEMS” default Acumatica button to add the items at line level.

 

If you wanted to write some logic while clicking the PLUS (+) button, you can write a logic in SOLine_RowInserting event in the SOOrderEntry extended graph.

 

Hi Guys,

 

Thanks for the reply. I tried few other approach as well, one of it was using AllowEdit=True on the grid which opens a pop up when I click on the newly added row. The problem is I’m unable to set the pop-up’s form foreign-key from the parent.

 

The CBApplicationDetailID is hidden and CBVechicleDetailID is set the primary key and set as PXSelector

Questions:

 

  1. How to I set the key/default value for the popup.
  2. Does this approach works?
  3. Can the grid auto refresh after I close the pop up?

Thanks

 

Userlevel 6
Badge +4

Hi @Kumaran 

Edit functionality takes you to the primary graph screen. You can see that in isolated fields where a pencil is next to the field. On a grid just takes you to the windowed screen when you click (Or double-click?) on the cell. Do you want to display a Window popup or a dialog popup ?

 

Default keys and values will depend on how you set them on the DAC. The grid can be refreshed by doing <ViewObject>.View.RequestRefresh(); during your processing.

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