Skip to main content

I wanted to redirect to a generic inquiry with a "Drilldown" tab similar to dashboard widget clicks.

After some research, I found the following method. 

string inqID = "cb567d54-187b-4466-a2e5-8776831ca6e9";
var url = new StringBuilder(PXGenericInqGrph.INQUIRY_URL).Append("?id=").Append(inqID).ToString();

List<PXFilterRow> filterRows = new List<PXFilterRow>();
filterRows.Add(new PXFilterRow("SOShipment_customerID", PXCondition.EQ, "AACUSTOMER"));
filterRows.Add(new PXFilterRow("SOShipment_siteID", PXCondition.EQ, "Retail"));

PXRedirectToUrlException ex = new PXRedirectToUrlException(url, PXBaseRedirectException.WindowMode.New, false, null);
ex.Filters.Add(new PXBaseRedirectException.Filter("Results", filterRows.ToArray(), "Drilldown"));

throw ex;

You have to add filter rows to the redirect exception.

 

You can learn more about GI redirects below.
https://asiablog.acumatica.com/2019/03/working-with-generic-inquiries-from-code.html

https://stackoverflow.com/questions/42537829/open-gi-on-button-click

 

I hope this is helpful!

Be the first to reply!

Reply