You need to sign in to do that
Don't have an account?
LinThaw
Maximum save records for StandardSetController?
Hi there,
How many records can save using save method of StandardSetController.
I try with 10111 records, but there is no governor error found.
there is debug source...
Regards,
LinThaw
How many records can save using save method of StandardSetController.
I try with 10111 records, but there is no governor error found.
there is debug source...
List<TestObj__c> saveRecordList = new List<TestObj__c>(); String queryStr = 'Select id, Name, TestField__c From TestObj__c limit 10111'; ApexPages.StandardSetController saveRecordListSetCon = null; saveRecordListSetCon = new ApexPages.StandardSetController(Database.query(queryStr)); saveRecordListSetCon.setPageSize(10111); saveRecordList = saveRecordListSetCon.getRecords(); for(TestObj__c r : saveRecordList ){ r.TestField__c = 'test10111'; } saveRecordListSetCon.save();
Regards,
LinThaw
There is no limit on saving the records.
Please refer to the below link for more information
https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/apex_ApexPages_StandardSetController_methods.htm
May I suggest you please refer the below link for reference.
- https://developer.salesforce.com/forums/?id=906F00000008zd8IAA
Hope it helps.Please mark it as best answer if the information is informative.so that question is removed from an unanswered question and appear as a proper solution.
Thanks
Rahul Kumar
I got some useful information from your post.
・No limit on saving the records,
・But need to define limit to avoid
> Maximum view state size limit (135KB) exceeded error
> Heap Size (3 MB) exceeded error
Regards,
LinThaw