Solved

Create PO from SO

  • 26 July 2023
  • 3 replies
  • 61 views

Userlevel 1
Badge

 

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.

 

icon

Best answer by darylbowman 29 July 2023, 12:35

View original

3 replies

Badge +10

The trace indicates:

Error: ‘Owner’ cannot be empty.

Have you checked into this?

Userlevel 1
Badge

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.

Badge +10

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


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