public class SOShipmentEntryExt: PXGraphExtension<SOShipmentEntry>
{
public static bool IsActive() => true;
[PXOverride]
public IEnumerable ConfirmShipmentAction(PXAdapter adapter)
{
Base.confirmShipmentAction.Press(adapter);
PXLongOperation.WaitCompletion(Base.UID);
Base.SelectTimeStamp();
if (Base.Document.Current.ShipmentType == SOShipmentType.Transfer)
Base.UpdateIN.Press();
return adapter.Get();
}
}
I actually had a similar project on my list to work on and got the above code to work as intended. I added the WaitCompletion() call because I was getting an error that the previous operation was not finished when calling Base.UpdateIN.Press(). The Base.SelectTimeStamp() call just updates the graph’s timestamp so you don’t get an error when the UpdateIN action attempts to persist records.