add calculation (total) on Accounts module

Hello agasmaha,

It seems there are many ways to do this, some quite a bit simple, and some more complex. I referred mostly to the following two solutions when seeking for this functionlaity:

  1. http://developer.sugarcrm.com/2012/11/06/showing-the-total-amount-for-a-column-in-a-listview-using-just-logic-hooks-and-jquery/
  2. http://www.synaxisworks.com/blog/technology/sugarcrm-add-total-for-opportunity-amount/?utm_source=sugarcrm&utm_medium=forum

The first one is very simple, using Logic Hooks. The second approach is more elaborated and professional, as you’ll probably be able to add a “totals” line in the table to display your results.

For me it was sufficient to go on with the first solution. In my case, I have a custom field on Accounts that represent the distance (Miles, Km) beetween my company and the customer. With Logic Hooks, I could populate automatically a similar custom field in the Meetings Module, and showed that field even on List Views of Meetings. Finally, using solution 1) above, I could see sums of those distances in a list view of the Meetings I was able to filter using Advanced Search.

Attached are the final results for me (unfortunately it’s in Portuguese, I don’t know if you’ll understand it).

Please get back to me if you want code examples on how to do this.

Celso.

2 Likes