I'm trying to execute this piece of code and getting the error. Can someone explain where I'm going wrong?
public class AccountHandler {
public static void insertAccount(Integer value){
Integer N =1;
List <Account> addAccounts = new List <Account>();
while (N<=value){
Account stores = new Account();
stores.Name ='Acme Inc'+N;
stores.AccountNumber='A000'+N;
addaccounts.add(stores);
N=N+1;
}
insert addAccounts;
}
}
2 risposte