2 respuestas
Please check once above code and let me know.ThanksVaraprasadtrigger UpdateAccountid on Contact (after insert) {
UpdteAccountIdOnContact.updateTitle(trigger.new);
}
public class UpdteAccountIdOnContact {
public static void updateTitle(list<contact> lstContats){
list<contact> lstOFCons = new list<contact>();
for(contact c : lstContats){
if(c.accountid != null){
contact cc = new contact();
cc.id = c.id;
cc.Title = c.accountid;
lstOFCons.add(cc);
}
}
if(lstOFCons != null){
update lstOFCons;
}
}
}