You need to sign in to do that
Don't have an account?
Nicole Levy
apex:pageBlockTable Collection size is size of all records in sObject, instead of just those returned by SOQL query
I have a <apex:pageBlockTable></apex:pageBlockTable> element that is looping over a variable in the page constructor. I have added `LIMIT 1000` to the end of the SOQL query and have confirmed the List<Asset> variable only has a size of 1000 using System.debug(). I keep getting this error on the actual visualforce page though:
Content cannot be displayed: Collection size 10,336 exceeds maximum size of 10,000.This is the total number of records in the sObject Asset. I don't know why or how it's pulling all of them when the SOQL query that grabs records for the variable is only grabbing 1000 records. Thanks in advance if you have any ideas what might be the cause of this.
All Answers
Use SOQL For Loop to push data in List.
https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/langCon_apex_loops_for_SOQL.htm