function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Dan_try_zeroDan_try_zero 

Multiple Formula field calculation

I have a question regarding the formula field:

Can I calculate (for example) the total of more field of different custom objects? and how can I do that?

 

 


thanks in advance.

Best Answer chosen by Admin (Salesforce Developers) 
PremanathPremanath

Go with Parent object filds

Create new Custom field --> with --> select data type as Roll-up summary->next

Then select which object and which field you want to summarize then go on next like that

 

check it there

 

http://login.salesforce.com/help/doc/en/fields_about_roll_up_summary_fields.htm

 

http://login.salesforce.com/help/doc/en/fields_defining_summary_fields.htm

All Answers

PremanathPremanath

Using Trigger or Apex class only it's possible.

using UI it's not possible at all.

Dan_try_zeroDan_try_zero

i make an example for be more clear:

 

I have an field called "billing" and a field called "id" on the custom object called "x"  

I need to make a sum of all the currecies of the "billing" field based on the id field of the object "x" on an object called  "y"

 

Can i do that on a simple formula field? if not i must do an apex class?

PremanathPremanath

If there is master-detail relationship between the x and y means, We can do it.

By using Roll-up summary from parent.

 

Clearly explain what is your requirement and which field belongs to which object, and tell me relation between two objects.

Dan_try_zeroDan_try_zero

Yes there is a master detail beteween the 2 objects, and the Roll-Up Summary is something that I have never tried to do.

any advice?

Thanks for the replies

PremanathPremanath

Go with Parent object filds

Create new Custom field --> with --> select data type as Roll-up summary->next

Then select which object and which field you want to summarize then go on next like that

 

check it there

 

http://login.salesforce.com/help/doc/en/fields_about_roll_up_summary_fields.htm

 

http://login.salesforce.com/help/doc/en/fields_defining_summary_fields.htm

This was selected as the best answer