Don't have an account?
Search for an answer or ask a question of the zone or Customer Support.
You need to sign in to do that
Sign in to start searching questions
Signup for a Developer Edition
Sign in to start a discussion
Can We change the StandardSetController PageSize?
In Normally PageSize per page is 2000(Default)..
Can we change pagesize from to 2000 to 3000?
Hi,
yes, there is a instance method of StandardSetController class, that you can use to set the size of record set per page.
void setPageSize(Integer pageSize)
Howdy,
I don't know if you can modify it from 2000, but there is a setPageSize() in the documentation. Give it a try and see if it works...
Link: http://www.salesforce.com/us/developer/docs/pages/Content/apex_pages_standardsetcontroller.htm
Thanks,
Adrian
I used setPageSize in My Apex class....
My code is
Accounts = new ApexPages.StandardSetController(Database.getQueryLocator([ SELECT Id,Rank__c,Name
FROM Account]));Accounts.setPageSize(2000);AccountList = (List<Account>)Accounts.getRecords();
I changed Page size to 3000
i.e Accounts.setPageSize(3000);
I got the following error
INVALID_BATCH_SIZE: invalid batch size: 3000
Any possible to change the value?
Accounts = new ApexPages.StandardSetController(Database.getQueryLocator([ SELECT Id, Rank__c,Name
FROM Account ])); Accounts.setPageSize(2000);AccountList = (List<Account>)Accounts.getRecords();
-
2,000 is the maximun value...
Hi,
yes, there is a instance method of StandardSetController class, that you can use to set the size of record set per page.
void setPageSize(Integer pageSize)
Howdy,
I don't know if you can modify it from 2000, but there is a setPageSize() in the documentation. Give it a try and see if it works...
Link: http://www.salesforce.com/us/developer/docs/pages/Content/apex_pages_standardsetcontroller.htm
Thanks,
Adrian
I used setPageSize in My Apex class....
My code is
Accounts = new ApexPages.StandardSetController(Database.getQueryLocator([ SELECT Id,
Rank__c,Name
FROM Account
]));
Accounts.setPageSize(2000);
AccountList = (List<Account>)Accounts.getRecords();
I changed Page size to 3000
i.e Accounts.setPageSize(3000);
I got the following error
INVALID_BATCH_SIZE: invalid batch size: 3000
Any possible to change the value?
I used setPageSize in My Apex class....
My code is
Accounts = new ApexPages.StandardSetController(Database.getQueryLocator([ SELECT Id,
Rank__c,Name
FROM Account
]));
Accounts.setPageSize(2000);
AccountList = (List<Account>)Accounts.getRecords();
I changed Page size to 3000
i.e Accounts.setPageSize(3000);
I got the following error
INVALID_BATCH_SIZE: invalid batch size: 3000
Any possible to change the value?
-
2,000 is the maximun value...