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!!