+ Start a Discussion

Maximum size of List in apex salesforce

hi i have created a DataBase.Batchable class in which i am inserting a custom object named it Event__c


public class BatchCreateGCalendars implements Database.Batchable<SObject>, Database.Stateful, Database.AllowsCallouts {

 private List<Event__c> event_id;


i am creating say 1000 records of type events and then using the statement

insert event_id;

is this good or inserting each element one by one is more appropriate.

in my custom object i created only one  custom field of type text(255).so what is the maximum size of list can be(approximate)??

please guideline 


To answer your question on the max size of a List, there isn't one. Check out this SalesForce doc for more info. http://www.salesforce.com/us/developer/docs/apexcode/Content/langCon_apex_collections.htm

K. Nandeeswara RajuK. Nandeeswara Raju
There is no limit on the number of items a collection can hold. However, there is a general limit on heap size.