You need to sign in to do that
Don't have an account?
Kiranpreet Kaur
Count 5000+ records in salesforce.
I have a visualforce page and I want to show all the lead record and also its count on this VF page.
For the records I have used pagination and offset to retrieve the records and shown on the page.
But the problem is that I cannot show the total no of leads on this VF page as the records are 5000+. It thorws an error as
TOO may rows 5001.
For the records I have used pagination and offset to retrieve the records and shown on the page.
But the problem is that I cannot show the total no of leads on this VF page as the records are 5000+. It thorws an error as
TOO may rows 5001.
You can use a count query (on your controller) to get the lead count, something like
Regarding showing all leads - pretty sure it can't be done unless you filter out some results (using dates or contacts or some other filter), or limit your query to 5,000 with
If I didn't understand you properly, please clarify.
I have used SELECT count(Id) FROM Lead query in controller to get count of leads. But as my records are large in no 5000+. It shows error as:
Too many query rows: 50001
I don't want to user any filter as I want the exact no leads available in my org.
quary
list<integer> ll= new list<integer>();
select id,lastname from lead
ll.add(lead.size);