Quantcast
Channel: FORNAV
Viewing all articles
Browse latest Browse all 372

Calculating sums in JavaScript

$
0
0

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.

The post Calculating sums in JavaScript appeared first on ForNAV.


Viewing all articles
Browse latest Browse all 372

Trending Articles