Generic Inquiry Redirect with Filters (Drilldown) From Code

  • 19 September 2021
  • 0 replies
  • 118 views

Userlevel 1
Badge

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!


0 replies

Be the first to reply!

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