Have a form pop-up in a new window

  • 21 January 2021
  • 1 reply

Userlevel 5
Badge +3

This is for 2020 R2

I am trying to have the base Shipment Confirmation form  (so642000) pop-up in a new window or Tab when printined from the Shipments form SO302000 

Currently, when you select the Reports > Print Shipment Confirmation the Shipment Confirmation opens in the current window. 

I can add a new form & set it to open in a new tab or Pop-Up but need some guidance on the existing form. 

Thank you!


Best answer by Hughes Beausejour 18 February 2021, 19:30

View original

1 reply

Userlevel 5
Badge +2

Acumatica uses C# exception mechanism to redirect to another web page (the report launcher is a web page).


You can create a customization with a graph extension that intercept the report redirect exception. Then you can modify the WindowMode property to New and rethrow the report redirect exception.


Source code for this solution:

using PX.Data;
using System;
using System.Collections;

namespace PX.Objects.SO
    public class SOShipmentEntry_Extension : PXGraphExtension<SOShipmentEntry>
        public delegate IEnumerable ReportDelegate(PXAdapter adapter, String reportID);
        public IEnumerable Report(PXAdapter adapter, String reportID, ReportDelegate baseMethod)
            if (reportID == "SO642000")
                IEnumerable returnValue = adapter.Get();

                    returnValue = baseMethod(adapter, reportID);
                catch (PXReportRequiredException ex)
                    ex.Mode = PXBaseRedirectException.WindowMode.New;
                    throw ex;

                return returnValue;
                return baseMethod(adapter, reportID);


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 — 2023  Acumatica, Inc. All rights reserved