The Generic Inquiry is Acumatica's low-code reporting and data-access tool. It is the single most underused feature in the platform — used casually by business analysts, leveraged at scale by people who understand how to push it. This guide is the second kind.
1. What a GI is, exactly
A GI is a saved query that:
- Joins one or more DACs together.
- Selects specific fields and applies calculated expressions.
- Filters rows by conditions.
- Optionally groups, aggregates, and pivots.
- Can be parameterised, scheduled, exported, and used as a data source for dashboards.
Under the hood, a GI compiles to a SQL view (or an inline TVF for parameterised ones). The platform manages this for you.
2. Building blocks
- Tables: the DACs you are joining. Start with one; add more only when you need them.
- Relations: the join definitions between tables. Use Acumatica's predefined relations where they exist.
- Results: the columns in the output. Each column is a field or an expression.
- Conditions: the WHERE clause. Filter at the GI level, not in the UI.
- Parameters: the runtime inputs. Use them for date ranges, branches, customers.
- Group By / Aggregate: for rollups and pivot tables.
3. The art of the join
Joins are where most GI performance problems start. Three rules:
- Join only the tables you actually need a field from.
- Prefer Acumatica's predefined relations over ad-hoc joins.
- For very large tables, denormalise via a view that pre-joins.
4. Parameters — the right design
Parameters are what turn a GI from a static report into a real analytical tool. The patterns that work:
- Date from / date to with sensible defaults (e.g. first of current month, today).
- Branch multi-select with a default to the current branch.
- Customer / vendor selectors using a screen-based lookup.
- Status checkboxes for filtering released vs unreleased documents.
// First of current month
=DateSerial(Year(Now), Month(Now), 1)
// Today
=Today()
// Current branch (AccessInfo)
=GetBranch()
5. Calculated columns
Calculated columns are expressions over the joined fields. The expression language is Acumatica-specific but SQL-flavoured. Use them for:
- Days outstanding:
=DateDiff('d', [DueDate], Today()) - Status labels:
=IIf([Status] = 'B', 'Balanced', 'Open') - Line totals:
=[Qty] * [UnitPrice]
6. Grouping and aggregation
Group By collapses rows that share a key. Aggregations (Sum, Count, Avg, Min, Max) compute over the group. Use them for "sales by customer", "invoices by branch", "stock by warehouse".
7. Pivot tables
Acumatica GIs support pivot output — rows × columns × values. Powerful, but expensive. Pivot GIs do not perform well past ~100k source rows. If you need pivot output over more data, pre-aggregate into a summary table or use a report instead.
8. Row-level security
A GI respects Acumatica's row-level security by default. If a user has access to only certain branches, the GI shows only those branches. You can tighten this further by adding a condition that filters by GetUserID() or GetBranch().
9. GIs as data sources
A GI is more than a screen — it can be:
- A dashboard widget.
- A data source for a report.
- A data source for a web service (REST exposes GIs via the OData endpoint).
- A data source for an import/export scenario.
10. Publishing and access
You can publish a GI to a workspace, a dashboard, a site map, or the Acumatica Self-Service Portal. Each placement has its own access right. Set these deliberately — an open GI in a public workspace is a common data leak.
11. Performance checklist
- All join columns indexed? Check the schema.
- All filter columns indexed? Check.
- Group By columns indexed? Helps aggregation.
- No
SELECT *on joined tables. Select only the fields you display. - Limit the data set in Conditions, not in the UI.
- Test with production-scale data, not 100 test rows.
12. Common mistakes
- Using
Group Byon a string field that has thousands of distinct values — explodes the result set. - Using a calculated field in a filter that cannot be pushed down to SQL — the GI scans the whole table.
- Forgetting to set row-level security, then exporting the GI to Excel and emailing it.
- Building the same GI four times instead of parameterising one well.
Related reading
Going deeper: production-grade patterns
The patterns above cover the basics. In production, the same patterns have to survive three things: scale, edge cases, and the next Acumatica upgrade. Here are the patterns that distinguish a working customisation from a great one — the ones I have applied to every client project in East and Southern Africa, and the ones that make the difference between a customisation the user trusts and a customisation they curse.
Defensive coding for the unexpected
Production is where the assumption dies. Every customisation that "works in test" fails in production the first time a customer name has a special character, an invoice is in a foreign currency, or a record has a null in a field you thought was required. The defensive habit is to explicitly handle the null, the empty, the special character, and the foreign currency in every event handler and every code path. The cost is 20% more code. The payoff is 95% fewer production tickets.
Three patterns I apply everywhere:
- Null-safe property access. Use
?.on every property access; the alternative is a NullReferenceException at 2 AM. - Explicit value handling. If a field can be empty, treat it as empty. Do not assume the default value.
- Defensive database reads. A
PXSelectthat returns null is a valid result, not an error. Handle it.
public class DefensiveExt : PXGraphExtension<BaseGraph>
{
protected void _(Events.RowSelected<MyDAC> e)
{
var row = e.Row;
if (row == null) return; // null-safe
var ext = row.GetExtension<MyDACExt>();
if (ext == null) return; // null-safe extension
var value = ext.UsrField ?? "DEFAULT"; // null-coalesce
var ok = decimal.TryParse(value, out var n); // try-parse
if (!ok) { /* handle */ }
}
}
Performance: the patterns that scale
Five performance patterns I apply on every customisation, in order of impact:
- Move heavy logic out of
RowSelected. Push validation toRowPersisting, side effects to a graph action triggered by a button.RowSelectedfires for every row on every render. - Index the join columns. Every BQL
Where<>filter needs an index. Check the execution plan before you ship. - Filter at the GI, not the UI. A GI that returns 5 million rows and filters in the presentation layer will time out. Push filters into the Conditions tab.
- Batch the work. Loop with 1,000 calls is slow; loop with 10 calls of 100 records is fast. Batch where you can.
- Cache the static. Tax schedules, account lists, and other static reference data can be cached for the lifetime of the app pool. Reduce the database load.
For the full performance playbook, see the performance tuning guide and the SQL Server indexing guide.
Upgrade survival
The customisation that breaks on the next Acumatica upgrade is the one that took a shortcut. The patterns that survive:
- Extend, never modify.
PXCacheExtension<T>over editing the base DAC.PXGraphExtension<T>over editing the base graph. - Usr prefix on every field. Acumatica uses this to separate your fields from base fields. Without it, your field collides with a base field on the next upgrade.
- Source control with a clear branch strategy. Main is production; develop is next release; feature branches are work in flight. Tag every release.
- Test on production data. The staging tenant is a copy of production. The data shape is the same. The bugs are the same.
// Base field — Acumatica owns this
[PXDBString(40)]
public string RefNbr { get; set; }
// Your field — always Usr prefix, never collides
[PXDBString(40)]
[PXUIField(DisplayName = "External Ref")]
public string UsrExternalRef { get; set; }
// Your DAC extension — soft extension, survives table drops
[PXTable(IsOptional = true)]
public class MyDACExt : PXCacheExtension<MyDAC>
{
#region UsrCustomField
[PXDBString(60)]
public string UsrCustomField { get; set; }
public abstract class usrCustomField :
PX.Data.BQL.BqlString.Field<usrCustomField> { }
#endregion
}
Testing: the habit that pays for itself
If you are not testing your customisation with the Acumatica Unit Test Framework, you are running blind. The framework ships with every installation, costs nothing, and pays for itself the first time an upgrade changes a method signature on you. The minimum coverage:
- Every graph action with business logic — happy path + the most common error path.
- Every DAC field with a defaulting or validation rule.
- Every workflow transition — that the right state is reached from the right source state.
- Every import scenario with a sample CSV that exercises the validation rules.
For the full test framework walkthrough, see the unit test framework guide.
Operations: what to do after the customisation is live
A customisation is not "done" when it ships. It is "done" when it has run in production for a quarter without a critical incident. The operational habits that get you there:
- Monitor the slow queries. Acumatica's System Monitor has a slow-query log. Review weekly; the slow query you ship is the production incident in two months.
- Track the licence headroom. Every active session counts. A leaking integration can lock out real users within an hour.
- Review the audit log. Not for compliance — for understanding how the system is used. The audit log tells you where to optimise next.
- Document the runbook. When the customisation fails (and it will), the runbook is what saves the on-call. Document the failure modes, the diagnostic flow, the fix.
For the broader operational patterns, see the monitoring guide and the licence concurrency guide.
The migration off the old customisation
Every customisation is eventually replaced. Plan for that day from the start. The patterns:
- Wrap external dependencies. If your customisation talks to an external API, wrap the call in your own service. When the API changes, you change one place.
- Tag the version. Every customisation has a version. The version is in the database, in the metadata, in the package. When you upgrade, you know what you are upgrading from.
- Document the data model. Every custom field, every new table, every relationship. The next person who has to read the customisation should be able to start with the data model.
- Test the migration path. A customisation that ships and cannot be removed is a liability. The migration path off should be tested before the customisation is in production.
For the broader migration patterns, see the data migration guide.
Wrapping up
That is the working approach I use on Acumatica projects. The same patterns show up whether you are in Nairobi, Johannesburg, Kigali, Lusaka or Harare — and they are the things that keep work moving when an upgrade lands at 6 PM on a Friday. If you are stuck on something specific, reach out or keep reading through the rest of the Acumatica blog.