Pagination: Records NOT fetching properly in Custom Inquiry screen

  • 12 January 2021
  • 0 replies

Userlevel 4
Badge +1

Hello Everyone,

I have created a custom inquiry screen with pagination, which will load the POReceipts by applying a few conditions.

After applying the pagination code records are loaded very fast and working as expected expect the below scenario.

Issue details.
When I filter a grid column, it is filtering and showing only the current page records but the filter is NOT applying to all the records. Could you please help me with this?

Ex: If I have total of 900 records and per page, if it is showing only 25 records. 
When I apply a filter to the grid column, it is filtering by taking only 25 records but NOT 900. 

When I debug, PXView.MaximumRows is taking 25 records and filtering them.

Sample Pagination Code:

public PXFilteredProcessing<Customer,
Where<Customer.bAccountID, Equal<Current<FilterDAC.customerID>>, Or<Current<FilterDAC.customerID>, IsNull>>> Records;
public IEnumerable records()
PXSelectBase<Customer> cmd = new PXSelectJoinGroupBy<Customer,
InnerJoin<ARInvoice, On<ARInvoice.customerID, Equal<Customer.bAccountID>>>,
Where2<Where<Customer.bAccountID, Equal<Current<FilterDAC.customerID>>, Or<Current<FilterDAC.customerID>, IsNull>>,
And<ARInvoice.docDate, Equal<Current<FilterDAC.invoiceDate>>>>,
int startRow = PXView.StartRow;
int totalRows = 0;
foreach (PXResult<Customer, ARInvoice> row in cmd.View.Select(new[] { Filter.Current }, null, PXView.Searches,
PXView.SortColumns, PXView.Descendings, PXView.Filters, ref startRow, PXView.MaximumRows, ref totalRows))
Customer cust = (Customer)row;
var existingRow = (Customer)Records.Cache.Locate(cust);
yield return existingRow ?? (Customer)row;
PXView.StartRow = 0;

0 replies

Be the first to 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