You need to sign in to do that
Don't have an account?
Vempally
Regarding Governer Limits for List and SOQL...
Hi everyone,
As we know that, SOQL can fetch a max of 50,000 records in a single execution...and
a List can store upto 1000 records...
Now,
List<Account> lst_acc = new List<Account>([Select id, name from Account]);
If the SOQL gives me more than 1000 records, how can I store them to the List.
As we know that, SOQL can fetch a max of 50,000 records in a single execution...and
a List can store upto 1000 records...
Now,
List<Account> lst_acc = new List<Account>([Select id, name from Account]);
If the SOQL gives me more than 1000 records, how can I store them to the List.
List wil not store 1000 record .If you want to dislay in vf without paginnation then you 1000 limit will come .else you can store more then 50000 record in a list .List has a limit of Heap size which is 6 mb .
You can check list create two list of account like accList /accList1 and Query with LIMIT 50000 .Now add both query it will add unless it wil reach the heap limit .
Let me know if it helps !!
Thanks
Manoj
Please mark this as the best answer if this helps.