function readOnly(count){ }
Don't have an account?
Search for an answer or ask a question of the zone or Customer Support.
You need to sign in to do that
Sign in to start searching questions
Signup for a Developer Edition
Sign in to start a discussion
List<Account> acclist=[Select id, Name from Account];
list<Account> lstAccount = new list<Account>(); for(integer i=0; i<10; i++){ Account acc = new Account(); acc.Name = 'Account ' + i; lstAccount.add(acc); } if(lstAccount.size() > 0){ insert lstAccount; }
list<Account> lstAccount = new list<Account>(); for(integer i=0; i<10; i++){ Account acc = new Account(); acc.Name = 'Account ' + i; lstAccount.add(acc); } if(lstAccount.size() > 0){ insert lstAccount; } ########################### list<Account> NewlstAccount = new list<Account>(); List<Account> lstAccount = [Select id, Name,Amount from Account]; for(Account Acc : lstAccount){ if(Acc.Amount != null){ NewlstAccount.add(Acc); } } sytem.Debug(NewlstAccount.size()); sytem.Debug(lstAccount.size());
Are you looking for how do we collect the Account as list. If so you can use the below.
If not please provide more details for the question.
If this answer helps you, Please mark it as best answer.
Thanks,
don't forget to mark it as best answer.
thank you
Try Below Code Please Mark It As Best Answer If It Helps
Thank You!
did you try any solution. please close your query by marking as best answer whatever answer was best for you.
Thank you