You need to sign in to do that
Don't have an account?

Exporting Records From standard controller set Error
Hi,
I created a custom List Button on Accounts ,which i placed it on Accounts View. when i Click that i call a VF page
PAGE:
---------
and MY controller :
-----------------------
public class Accounts_export {
public Accounts_export(ApexPages.StandardSetController controller) {
controller.setPageSize(4000);
}
}
I am Facing problem to export 4000 records to CSV or Excel where i can export 2000 records sucessfully
The Error when i give size as 4000 is
"system.security.NoAccessException: Object type not accessible. Please check permissions and make sure the object is not in development mode: invalid batch size: 4000
"
Any Ideas !
I guess 4000 is more than you're allowed with the standard pagination code.
So why not just use a custom controller with a SOQL query on Accounts? Something like:-
public with sharing class Accounts_export {
public Accounts_export() {
}
public <list>Accounts getAccounts() {
return [Select Name, Phone, Business_Email__c, etc from Accounts limit 4000];
}
}