Detect if a JavaScript record or data item record is the last record within the current filter
Sometimes it is helpful to know whether a record is the last record within a filter because it can be used to order, to add, or to remove output, such as the sections underneath.
This can be done by using the Rec.IsLastRecord() JavaScript function.
In this example, Header.IsLastRecord() and Line.IsLastRecord() are used to detect if the Header and Line record are the last records with the current filter:

On the last page of the report output, Header.IsLastRecord() returns True, and Line.IsLastRecord() returns False for the first line and True for the second (last) line:

Latest news
Latest knowledge base articles
-
FORNAV moves to the layout type “Custom”
-
Detect if a JavaScript record or data item record is the last record within the current filter
-
Troubleshooting when using the FORNAV reporting service for printing (Server Print)
-
Setting up Business Central for FORNAV E-invoicing and Peppol Plus
-
Using Auto Format in FORNAV layouts
