Solved

Grab info from line level to header

  • 20 January 2022
  • 3 replies
  • 237 views

Userlevel 2
Badge

Hi there,

 

I have a fairly simple requirement in which the first row of the line level will overwrite the info in header level (both are custom fields). Example of it is shown in the screenshot below:

 

I have read a similar case to this but from header to row: Getting value of field on header from grid change event, however I failed to grasp on how to narrow it down to only the first line.

icon

Best answer by Naveen Boga 20 January 2022, 04:19

View original

3 replies

Userlevel 7
Badge +17

Hi @ericklasimin61 

Here is the simple source code to achieve the requirement. Also, attached video recording for your reference.

  public class SOOrderEntryExt : PXGraphExtension<SOOrderEntry>
{
public delegate void PersistDelegate();
[PXOverride]
public void Persist(PersistDelegate del)
{
if (Base.Document.Current != null)
{
SOLine objSOLine = Base.Transactions.Select().FirstTableItems.ToList().FirstOrDefault(); // To get the First Row from Document Details tab
Base.Document.Current.OrderDesc = objSOLine.TranDesc;
}

del();
}
}

 

 

Userlevel 2
Badge

You’re a wizard, @Naveen B ! It works like a charm! Thanks a lot!

Userlevel 7
Badge +17

Awesome @ericklasimin61  Thanks a lot for sharing the update. :-)

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