I am able to fetch for each soql only 2000 records(Due to Governer limitis) for external objects. but i want to fetch the remaining records and pass the remaining list also to vf page to display the records. Please let me know how to overcome this governor limit issue and display all the records in Vf page.
You can do so by this steps:
- Get the count of external object.
- Divide this by 2000, use this value in the for loop condition.
- In the loop query the object and add the records to a list.
- for every iteration add the records to the list.
- One more thing to take of is that, put the offset 2000 * n, where n = 1,2,3.. in the query so that the records will not be duplicate.
After this steps you will get all the records to display on the vf page.
Hope this helps you!!
If this is a Visualforce page you can use the readOnly attribute to allow the display of upto 1 million records like so:
As the name suggests, you can only use this to view the records, not perform any action on them.