Redirect to report using PXLongOperation

  • 18 November 2022
  • 1 reply

Userlevel 2

Hi, I am currently trying to throw a redirect to report exception in a customization project. But because I need the page to refresh as well as the new page to be thrown, the exception needs to be thrown in another thread to not interfere with the return value of the function. 

The function is as follows:

public delegate IEnumerable PrintInvoiceDelegate(PXAdapter adapter, String reportID);
public IEnumerable PrintInvoice(PXAdapter adapter, String reportID, PrintInvoiceDelegate baseMethod)
PXLongOperation.StartOperation(Base, delegate ()
//Calls the stock print method of SO303000 which will throw a report redirection in new tab
baseMethod(adapter, reportID);

//I want the function to still return because I want the page to refresh and show the updated information
return adapter.Get();


1. Before calling print action


2. PXLongOperation success


3. After complete, page refresh and files now shows that a new file has been attached


My question is, I can’t figure out why there is no success message of the PXLongOperation pop-up (as seen in the second image). Second question just out of interest, is there another way of doing this, as in to throw a redirect exception and refreshing the current page to reflect up-to-date information?

Any insight and help would be invaluable, thanks. 


Best answer by Vignesh Ponnusamy 23 November 2022, 20:24

View original

1 reply

Userlevel 7
Badge +4


You can try something like below to show the long operation success message,

  • throw new PXOperationCompletedException(String.Join("", "Created Bank Receipt"));

You can add it after executing your logic or after throwing the redirect. I hope that helps, thanks.!


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