You need to sign in to do that
Don't have an account?
jagdish nikam 9
Calculate sum of contact fields and display on account page
Hi All,
If i have cusotm field "ConAmount" on contact object which hold any number or any currency and i just want to display a sum of that field for all contact on account page. How can i acheive this? Is it possible using workflow if not then please provide a trigger code for the same.
If i have cusotm field "ConAmount" on contact object which hold any number or any currency and i just want to display a sum of that field for all contact on account page. How can i acheive this? Is it possible using workflow if not then please provide a trigger code for the same.
Find all related account ids.
Do a soql query of all those accounts with related contacts.
Calculate the new sum for each account by summing all contacts for each account.
Update only those accounts where the sum actually changed.