Calculating sums in JavaScript
Sometimes it is useful to be able to calculate the total of a field across a table without running through all the records like the Rec.Calcsum() function does in AL.
To do this, you can simply use the Sum value on a FieldExtension field:
List.FieldExtensions.Amount.Sum
If the field is a calculated field, Business Central will use that to calculate the sum, otherwise it will iterate though the records to calculate it.
Any filters set on the record are used for the calculation.
Latest news
Latest knowledge base articles
-
AI Assistant in the ForNAV Designer (beta)
-
Mapping from Business Central documents to ZUGFeRD and XRechnung
-
Using native Business Central ZUGFeRD generation with FORNAV reports
-
Repeater tables and barcodes in the ForNAV Template Editor
-
Controlling report language, format region, copies, and watermark with the Report Settings page
