AnsweredAssumed Answered

How to sum up line level calculated fields in Community Edition?

Question asked by Chris Hall on Oct 15, 2014
Hi All,

I am working with SugarCRM CE and I would like to be able to update a header record with the sum total of a total calculated field on related line level records....if that makes sense.

For example, I have two modules, Job Header and Job Items.

On Job Items I have a calculated field called TotalField which adds up two field values.

JobNumber       Item       FieldValue1      FieldValue2       TotalField

12345                1                   5                        5                     10
12345                2                  10                       10                   20
12345                3                   2                        2                      4

In a different module I have the Job Header, and I would like to add up all the TotalField's on each of the JobItems and put the sum of the TotalField into a field on the JobHeader.

JobNumber Sum of Total
12345                  34

Can this be done?

Many thanks in advance amazing people.