Skip to main content

 

Hi,

I did a process to create a PO from a SO in the Sales Order screen. It works a bit different than the current create PO process where you specify the vendor details on the SO line and create the PO by clicking on an Action.

The problem I have is when I call the

POCreate.CreateProc

I don't get any exception that there was an error creating the PO. I only see the error afterwards in the Trace.

PXLongOperation.StartOperation(Base, delegate ()
{
try
{
POCreate.CreateProc(list, poFilter.PurchDate, poFilter.OrderNbr != null);
}
catch (PXRedirectRequiredException ex)
{
// Acuminator disable once PX1050 HardcodedStringInLocalizationMethod dJustification]
// Acuminator disable once PX1051 NonLocalizableString gJustification]
throw new PXException(ex.Message, ex.InnerException);
}
});

The  PXRedirectRequiredException is not caught.

 

The trace indicates:

Error: ‘Owner’ cannot be empty.

Have you checked into this?


Yes, that is easy to solve. My problem is reporting that error or any other error that occurs when the PO is not created in the SO.


Ah, I misunderstood your question.

 

In my understanding, you can't display user feedback in a PXLongOperation because it's a new thread (different from the UI thread).

In situations like this, I usually try to validate the required fields before starting the PXLongOperation.


Reply