SOOrderEntry Table Action button

  • 1 September 2023
  • 3 replies

Userlevel 3

Hi I have seen many examples of PXAction being used in conjunction with PXAdapter to get the main DAC from the table the PXAction button is on.  This helps in getting calls from Process screens to an Action button.  So in my case the SOOrder Table is available and I need more.  Is there a way to get the SOLine current record as well using PXAdapter, in the same method the main DAC is accessible?   Keep in mind this is all for a process screen and needs to be Static: No Base or this or the like? 

Thanks in advance. 


Best answer by darylbowman 1 September 2023, 19:15

View original

3 replies

Badge +12

If the adapter is coming from an action of a particular graph, you can cast adapter.View.Graph as the graph type:

var orderGraph = adapter.View.Graph as SOOrderEntry;

Once you have a graph, you can use it the way you normally would use Base:

SOOrder order = orderGraph.Document.Current;
var lines = orderGraph.Transactions.Select();
SOLine line = orderGraph.Transactions.Current;


For example:

public virtual IEnumerable Test(PXAdapter adapter)
var orderGraph = adapter.View.Graph as SOOrderEntry;
SOOrder order = orderGraph.Document.Current;
if (order is null) return adapter.Get();

var lines = orderGraph.Transactions.Select();
SOLine line = orderGraph.Transactions.Current;

// do stuff

return adapter.Get();


Userlevel 7
Badge +19

@edwardmcgovern97  Can you please share the code of your processing screen and let us know what you want to try to achieve by modifying code so that it will be helpful for us to review and suggest the best solution?


Userlevel 3

Hey Naveen, 

No need Daryl nailed it. 

I was use to grabbing the main table from adapter.Get like below: 

foreach (RSSVWorkOrder order in adapter.Get()) { list.Add(order); }


But never accessed other tables in my actions.  I needed to grab several layers from the Order Entry Screen and now that I know where the graph is in PXAdapter thats not an issue. 

But thanks anyway


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