Skip to main content
Question

Automating a Processing screen

  • September 19, 2025
  • 2 replies
  • 66 views

Forum|alt.badge.img+1

Hello, 
I’d like to automate the SOPickingWorksheetProcess processing screen, from the SOShipmentEntry screen. The idea is to programmatically set the filter fields, then loop over the shipments returned, select some based on certain conditions, and hit the Process button. I’m able to do everything up to the point of ‘pressing’ the Process button. 

I’ve read various article which suggested that programmatically click Process might be possible but no clear method of actually doing it. The main suggestion is to find the method which Processing calls and simply call that. 

The issue with SOPickingWorksheetProcess is getting access to these methods. 
The main method is ProcessShipmentsHandler, but this is private, so I cannot call from outside the class.
A more promising method is called ProcessShipments, but this is protected virtual, so I cannot call from outside the class, or a derived class. 

I have attempted to create a wrapper class around SOPickingWorksheetProcess, my custom method RunCreateWavePickList now has access to the protected CreateWavePickList method.

public class SOPickingWorksheetProcess_Public : SOPickingWorksheetProcess
{
public void RunCreateWavePickList(SOPickingWorksheetProcess.HeaderSettings settings, IEnumerable<SOShipment> shipments)
{
// Call the protected method
CreateWavePickList(settings, shipments);
}
}

I want to override CreateShipment, no code is below.

public class SOShipmentEntry_Extension : PXGraphExtension<PX.Objects.SO.SOShipmentEntry>
{
public delegate void CreateShipmentDelegate(CreateShipmentArgs args);
[PXOverride]
public void CreateShipment(CreateShipmentArgs args, CreateShipmentDelegate del)
{
del(args);

//Create subclass - error occurs on the next line
SOPickingWorksheetProcess_Public sOPickingWorksheetProcess3 = PXGraph.CreateInstance<SOPickingWorksheetProcess_Public>();

//code to set filters, select shipments etc, never gets here
sOPickingWorksheetProcess3.RunCreateWavePickList(settings, listShipments);
}
}

But when creating the graph I get the following error

The error text is below - notice 2 spaces after the word ‘view’, I wonder if a view name should appear. 

PX.Data.PXViewDoesNotExistException: 'Error: The view  doesn't exist.'

I’m not sure what I’m supposed to do it fix this. Or perhaps I’m doing something Acumatica doesn’t support. 

Has anyone seen anything similar in the past?

2 replies

Dmitrii Naumov
Acumatica Moderator
Forum|alt.badge.img+7
  • Acumatica Moderator
  • September 19, 2025

Hello, 
I’d like to automate the SOPickingWorksheetProcess processing screen, from the SOShipmentEntry screen. The idea is to programmatically set the filter fields, then loop over the shipments returned, select some based on certain conditions, and hit the Process button. I’m able to do everything up to the point of ‘pressing’ the Process button. 

 

That just sounds like you need to add an automation schedule for this screen. Why do you even need to write any code here?


darylbowman
Captain II
Forum|alt.badge.img+15
  • September 19, 2025

That just sounds like you need to add an automation schedule for this screen. Why do you even need to write any code here?

First ☝🏻

But, try this:

[PXProtectedAccess]
public abstract class SOPickingWorksheetProcessExt_ProtectedAccess : PXGraphExtension<SOPickingWorksheetProcess>
{
[PXProtectedAccess(typeof(SOPickingWorksheetProcess))]
public abstract void ProcessShipments(string action, HeaderSettings settings, IEnumerable<SOShipment> shipments);
}

public class SOShipmentEntry_Extension : PXGraphExtension<PX.Objects.SO.SOShipmentEntry>
{
public delegate void CreateShipmentDelegate(CreateShipmentArgs args);
[PXOverride]
public void CreateShipment(CreateShipmentArgs args, CreateShipmentDelegate del)
{
del(args);

//Create subclass - error occurs on the next line
var sOPickingWorksheetProcess = PXGraph.CreateInstance<SOPickingWorksheetProcess>();
var sOPickingWorksheetProcessExt = sOPickingWorksheetProcess?.GetExtension<SOPickingWorksheetProcessExt_ProtectedAccess>();

//code to set filters, select shipments etc, never gets here
sOPickingWorksheetProcess.RunCreateWavePickList(settings, listShipments);

sOPickingWorksheetProcessExt?.ProcessShipments(...);
}
}