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
mark_pamark_pa 

Formula of a Formula

Hello all,

 

I came across an interesting situation today that I have not seen before.

 

I am trying to add functionality to our products to update my live site with the amount of storage a customer can use based on the products they have. It is possible in my system to have multiple products with a different amount of storage that should add to the total storage.

 

I applied a value to the product for storage and we use an Account Products custom object to assign products to customers. This storage field is passed to the account product which I would like to total the amount of storage allocated at the account level.

 

Initially, I thought I would be able to use a Roll-Up Summary field to sum this amount from the account products assigned to the account to give me a total storage available. Apparently, you cannot sum formula fields from another object even if they use a number (ie Product -> Account Product -> Account).

 

Can anyone think of a way to accomplish this?

 

Mark

Best Answer chosen by Admin (Salesforce Developers) 
rockchick322004rockchick322004
You can summarize number and currency formula field values with rollup summary fields.  However, if the formula field has any cross-object references in it, you cannot use it in a rollup summary field (not as a value to rollup and not in the filter criteria).  Or, you are seeing the limitation that you cannot roll up a roll up value.  The only place this is allowed is across the standard relationship from Opp Product to Opp to Account.  This is not yet supported across custom relationships (because we do not support multi-level master-detail relationships yet).

All Answers

rockchick322004rockchick322004
You can summarize number and currency formula field values with rollup summary fields.  However, if the formula field has any cross-object references in it, you cannot use it in a rollup summary field (not as a value to rollup and not in the filter criteria).  Or, you are seeing the limitation that you cannot roll up a roll up value.  The only place this is allowed is across the standard relationship from Opp Product to Opp to Account.  This is not yet supported across custom relationships (because we do not support multi-level master-detail relationships yet).
This was selected as the best answer
mark_pamark_pa
Lame. Well I guess I can hope to see that functionality in the future.