Trigger TriggerName on Contact(After insert,After Update){ List<Account> accList = new List<Account>(); for (Contact con : Trigger.new){ acc = [select id,Name,description from Account where id := con.Accountid]; acc.description = con.description; accList.add(acc); } updae accList; }
List<Account> accList = new List<Account>();
for (Contact con : Trigger.new){
acc = [select id,Name,description from Account where id := con.Accountid];
acc.description = con.description;
accList.add(acc);
}
updae accList;
}
Use the following code: Thanks!