Hello together,
I’m facing a quite weird issue.
There is a table with 15 flowfields defined and 176 records.
When I run the list page for this table, it takes around 10 minutes to open.
OK, one could say it is a key issue, flowfields pointing to tables with insufficient key definition and SumIndexFields, but…
When I redesign the page in the following way:
OnFindRecord(Which : Text) : Boolean
POSJournal.COPYFILTERS(Rec);
POSJournal := Rec;
FoundRec := POSJournal.FIND(Which);
Rec := POSJournal;
EXIT(FoundRec);
OnNextRecord(Steps : Integer) : Integer
POSJournal.COPYFILTERS(Rec);
POSJournal := Rec;
RealSteps := POSJournal.NEXT(Steps);
Rec := POSJournal;
EXIT(RealSteps);
OnAfterGetRecord()
CALCFIELDS(Cash,"Debit Card","Credit Card",Check,Others,Voucher,"On Account","Total Payments");
CALCFIELDS("Sale incl. VAT","Sale excl. VAT","Credit Memo incl. VAT","Credit Memo excl. VAT","Special Documents","Payment Discount");
CALCFIELDS("Purchase Invoice incl. VAT","Purchase Invoice excl. VAT","Total incl. VAT","Total excl. VAT")
So actually looping the records myself and not let NAV generate weird SQL statements, it opens in less than two seconds.
(The first CALCFIELDS row is targeting one tabel, the other two rows are targeting another table)
Has anybody else faced this issue?