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
Ram k 10Ram k 10 

Unable to deploy Roll ups


No more than 40 "Roll-Up Summary" fields are allowed per object.

We are getting the above error when we try to deploy existing and new Rollups.
 
We get the same error even if we try to deploy only existing rollups or only new rollups.
 
Only way it is working is by  manually creating the rollup fields and then deploy. As this is not a best practice, any suggestions on resolving this issue would be highly appreciated.
AshwaniAshwani
Did you check that target organisation has scope to add 40 rollups on object? You can check that limit by going to any object which is a Master and see section "Object Limits".
Ram k 10Ram k 10
Thanks for your response Ashwini,  In target organization currently We have 31 rollups and total roll ups for the object is 40.  Still we are unable to deploy the rollups.
 
Parin LadParin Lad
Sreeram - I have spotted another Case that I think is similar to yours - does this sound similar:

"In the sandbox 'XXXX' i am trying to deploy the change set called "opportunity XXX" it is failing becasue it says it cannot create a roll up summary field because the max of 20 is met. I deleted 4 roll up summary fields and tried again, still failing. I counted them and there is less than 20 and it still will not deploy. "


 
Parin LadParin Lad
The suggested solution on this Case was the following:

"We were able to resolve your case today by telling you that you would need to erase the roll-up summary fields to correct the issue, you said to close the case . For more information, please click on the Help and Training link in the upper right hand corner of the application. Then search by keywords "Deleting Custom Fields"

The related Help article on this is here: https://help.salesforce.com/apex/HTViewHelpDoc?id=fields_managing_deleted_fields.htm&language=en_US

Try the step of PERMANENTLY DELETING some of the Rollup Summary Custom fields in Production.  I wonder if the issue here is that the # of Roll Up Summary fields is being flagged as limit reached because some of them have been deleted but not permanently deleted?
 
Ram k 10Ram k 10
Hi Parin, 

"In the sandbox 'XXXX' i am trying to deploy the change set called "opportunity XXX" it is failing becasue it says it cannot create a roll up summary field because the max of 20 is met. I deleted 4 roll up summary fields and tried again, still failing. I counted them and there is less than 20 and it still will not deploy. "

I found above as similar to our case.  But we did not delete any of the Roll up fields.  If we delete any of the fields, then we may lose the data.

 
AshwaniAshwani
Deleting Rollup fields should not create loss of data because as soon as you create them again it will again popoulate data accoring to goven summarization. Rollups are simply summarization of child records field