Skip to main content

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!

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);
        PXOverride]
        public IEnumerable Report(PXAdapter adapter, String reportID, ReportDelegate baseMethod)
        {
            if (reportID == "SO642000")
            {
                IEnumerable returnValue = adapter.Get();

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

                return returnValue;
            }
            else
            {
                return baseMethod(adapter, reportID);
            }
        }
    }
}


Reply