Navigate
We have now covered everything that is necessary for our squash court application to run but there is one special function of Microsoft Dynamics NAV that needs changing when we add new documents and ledger entries: the Navigate function.
The functionality was already discussed in Chapter 1, Introduction to Microsoft Dynamics NAV. The object is a single page (344) in the application that requires two changes.
FindRecords
The first function we change is FindRecords. This browses through the database finding all possible combinations of document no. and posting date.
FindRecords()
...
// Squash Ledger Entries
IF SquashLedgEntry.READPERMISSION THEN BEGIN
SquashLedgEntry.RESET;
SquashLedgEntry.SETCURRENTKEY("Document No.",
"Posting Date");
SquashLedgEntry.SETFILTER("Document No.",DocNoFilter);
SquashLedgEntry.SETFILTER("Posting Date",PostingDateFilter);
InsertIntoDocEntry(
DATABASE...