+ Start a Discussion
Neeta Kavipurapu 3Neeta Kavipurapu 3 

Collection size 1,088 exceeds maximum size of 1,000” error.

While creating chatter unfollow rule using already installed “Chatter Unfollow Rule” app, whenever I click on “New Chatter Unfollow Rule” button on the “Chatter Unfollow Rule” tab,
I am getting “Collection size 1,088 exceeds maximum size of 1,000” error.
Please suggest a remedy for this in case this is some package configuration 
KaranrajKaranraj
Neeta - Its a visualforce collection size limit, one of the collection variable in your controller class holds more than 1000 records, so you are getting this error message. To over come this create a list of list to store the collection variable and then loop the collection varaible in visualforce page to display. If it is managed package, then you can't make any change in the code, you have to contact the application provider for update the code. If you installed the unmanaged package version of Chatter unfollow rule, then you can able to modify the code to overcome this limit.

Check the below sample for the example for list of list varaible 
List<List<Account>> accounts = new List<List<Acccount>();
List<Account> tempList = new List<Account>();
for(Account a : [select Id, Name, Industry from Account]){
	tempList.add(a);
	if(tempList.size() == 1000){
		accounts.add(tempList);
		tempList = new List<Account>();
	}
}
accounts.add(tempList);

Thanks,
Karanraj
PratikPratik (Salesforce Developers) 
Hi Neeta,

Is this a package related issue, you can post it in review section of package in appexchange.

Thanks,
Pratik