I am currently updating contact related records on accounts which updates my contacts correctly. When i try this for account I get the error:
Method does not exist or incorrect signature:
void addAll(Account)
from the type List.
What is wrong with my signature. See below.
public PageReference updateContacts() {
system.debug('accList '+accList);
contactList = new List<Contact>();
for(Account accnt :accList){
contactList.addAll(accnt.Contacts);
}
accountList = new List<account>();
for(Account accntnew :accList){
accountList.addAll(accntnew);
}
update contactList;
update accList;
return null;
}