+ Start a Discussion
venkatasubhashkvenkatasubhashk 

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:

---------

 

<apex:page standardController="Account" contentType="text/csv#Contact.csv" cache="true" recordSetVar="Accounts"  extensions="Accounts_export">
Customer Name,
"Phone",
"Email Id",
"Billing Street",
"City",
"Billing State/Province",
"Zip/Postal Code"
<apex:repeat value="{!Accounts}" var="a">  
{!a.Name},
"{!a.Phone}",
"{!a.Business_Email__c}",
"{!a.BillingStreet}",
"{!a.BillingState}",
"{!a.BillingCity}",
"{!a.BillingPostalCode}"   
    
</apex:repeat>
</apex: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 !