Create a field on Contact called Profile, text, 255
Assignment: When an Account is updated and the Website is filled in, update all the Profile field on all Contacts to:
Profile = Website + ‘/’ + First Letter of First Name + Last Name
trigger UpdateContactByAccount on Account (After Update) {
List<Contact> contacts=new List<Contact>();
For(Account acc:trigger.new){
ID accid=acc.Id;
//cons.Profile__c='Website + ‘/’ + First Letter of First Name + Last Name';
List<Contact> listOfContact=[select id From Contact Where Account.Id=:acc.Id And Account.Website !=null];
For(Contact contactItem:listOfContact){
//contactItem.Profile__c=contactItem.Website + '/' + contactItem.FirstName + contactItem.LastName;
contacts.add(contactItem);
}
}
update contacts;
}