I'm going to write a daily scheduled apex class. I have a couple of questions about the governor limit:
1)Example:
> Account acct = new Account(name='test account');
>
> insert acct;
>
>
> Contact[] contactsToCreate = new Contact[]{};
>
> for(Integer x=0; x<1000;x++){
>
> Contact ct = new Contact(AccountId=acct.Id,lastname='test');
>
> contactsToCreate.add(ct);
>
> }
>
>
> insert contactsToCreate;
So i will have just 1DML for 1000 records (salesforce limit is 150 DML instructions) which is the size limit for a list(like contactsToCreate) for an insert () DML statement?
2)for (List<Account> accts : [select name from Account])
is there some limit about the number of record that i can manage with a for loop like the above?
Thanks in advantage for any advice. BR