Generic Inquiry扩展问询:能否添加自定义Action或创建自定义展示屏幕
Absolutely! Both of your requests are totally achievable in Acumatica—let’s break this down step by step.
You absolutely can add custom actions to a Generic Inquiry (GI) results page, and it’s a common customization. Here’s how to do it:
Enable Customization for the GI
First, open your GI in the design screen, go to the Settings tab, and make sure the Allow Customization checkbox is checked. This lets you extend the GI’s underlying graph.Add the Custom Action in the GI Designer
Navigate to the Actions tab of the GI. Click Add Action, give it a display name, set its location (e.g., Toolbar to show it above the results grid), and save the GI.Implement the Action Logic with a Graph Extension
Create a graph extension for the GI’s base graph (GenericInqGraph) to define the action’s behavior. Here’s a simple example that processes the GI’s results:public class MyGI_GraphExtension : PXGraphExtension<GenericInqGraph> { // Define the custom action public PXAction<GenericInqGraph> ProcessSelectedRows; [PXButton(CommitChanges = true)] [PXUIField(DisplayName = "Process Selected Rows")] protected void processSelectedRows() { // Get the selected rows from the GI results view var selectedRows = Base.Views["Results"].SelectMultiBound(); foreach (var row in selectedRows) { // Access field values from the row (adjust field names to match your GI) var customerID = row.GetItem<int?>(typeof(Customer.BAccountID).Name); var orderDate = row.GetItem<DateTime?>(typeof(SOOrder.OrderDate).Name); // Execute your custom logic here: update records, send emails, generate documents, etc. } } }Deploy this extension, and your custom action will appear on the GI results page, ready to run against the query’s data.
If you’d prefer not to extend the default GI page, building a custom page to display the GI’s data is just as straightforward:
Create a Custom Graph
Build a new graph that either replicates the GI’s query or loads the existing GI definition directly. This gives you full control over data access:public class CustomGIDisplayGraph : PXGraph<CustomGIDisplayGraph> { // Load data using your GI's ID (replace "SalesOrdersGI" with your GI's unique ID) public PXSelectFrom<GenericInqResult>.View GIResults; public CustomGIDisplayGraph() { // Fetch the GI's query definition var giQuery = PXGenericInqGrph.GetGIQuery("SalesOrdersGI"); // Apply the GI's query to your view GIResults.View.BqlSelect = giQuery.BqlSelect; } }Build the Custom ASPX Page
Create a new ASPX page in Acumatica’s customization editor, add aPXGridcontrol, and bind it to theGIResultsview from your custom graph. You can fully customize the grid’s columns, filters, layout, and add additional actions specific to this page—something you can’t always do with a standard GI.Configure Permissions
Don’t forget to set up security permissions for your custom page and graph, so the right users can access it.
A few quick notes:
- For the GI action approach, you can target either all results or just selected rows (using
SelectMultiBound()as shown). - With a custom page, you can integrate other Acumatica components (like dashboards, related records, or custom UI elements) seamlessly.
内容的提问来源于stack exchange,提问作者Joseph Caruana

