Posts

Showing posts from March, 2022

Trigger - Create contact when new account created

Image
  Trigger - Create contact when new account created Another Example: Trigger Code : CreateAccountContact.apxt 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 trigger CreateAccountContact on Account (after insert) {             list<contact> contacts = new list<contact>();             for (account acc : trigger. new ){                     if (acc.Industry == 'Banking' ){                             contact con = new contact();                             con.LastName = acc.name;                             con.Phone = acc.Phone;                             con.AccountId = acc.Id;                             contacts.add(con);                         }                 }        insert contacts; }

Trigger - Prefix firstname with Dr when new lead is created or updated

Image
 Trigger - Prefix  firstname with Dr when new lead is created or updated