1 answer
Hii Harshal Khadke Try The Following Code
Please Mark It Best Answer If it HelpsThank You!In This When Account Updates CheckBox Field On Contact is Updated
trigger accountcontat on Account (after update){
List<Contact> contactList = new List<Contact>();
List<Contact> contactList1 = new List<Contact>();
for(Account acc: [SELECT Id,(SELECT Id,checkbox__c FROM Contacts) FROM Account WHERE Id in: Trigger.new]){
If(acc.Contacts.size()>0){
contactList.addAll(acc.Contacts);
}
}
for(contact c:contactList){
c.checkbox__c=true;
contactList1.add(c);
}
update contactList1;
}