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. The object is a single page (344) in the application that requires two changes.
FindRecords
The first function we change is FindRecords
. This browses though 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::"Squash Ledger Entry",0, SquashLedgEntry.TABLECAPTION...