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
trigger checkboxupdateoncontact on Account (after update) { Set<Id> accountIds = new Set<Id>(); for(Account a:Trigger.new) { if(a.checkbox__c==True){ accountIds.add(a.Id); } } List<Contact> ConListToUpdate=new List<Contact>(); List<Contact> ConList = [Select Id, AccountId,checbox__c from Contact where AccountId IN :accountIds AND checkbox__c=False]; if(ConList.size()>0) { for(Contact Con : ConList) { Con.checbox__c=true; ConListToUpdate.add(Con); } } if(ConListToUpdate.size()>0) { update ConListToUpdate; } }
Which fields you want update?
Thanks!!
Try with below code.
If this helps, please mark it as best answer.
Thanks!!