Skip to main content
Solved

Create PO from SO


wikusvorster42
Freshman II
Forum|alt.badge.img

 

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 [Justification]
                        // Acuminator disable once PX1051 NonLocalizableString [Justification]
                        throw new PXException(ex.Message, ex.InnerException);
                    }
                });

The  PXRedirectRequiredException is not caught.

 

Best answer by darylbowman

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.

View original
Did this topic help you find an answer to your question?

3 replies

darylbowman
Captain II
Forum|alt.badge.img+13

The trace indicates:

Error: ‘Owner’ cannot be empty.

Have you checked into this?


wikusvorster42
Freshman II
Forum|alt.badge.img

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.


darylbowman
Captain II
Forum|alt.badge.img+13

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


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings