• Praful Ingole
  • NEWBIE
  • 0 Points
  • Member since 2019

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 1
    Replies
Hi,

trigger contactrecords on Account (before insert)
 {

    List<String> myname=new List<String>();
    for(Account a:trigger.new)
    {
    myname.add(a.name);
    }
    List<contact> mycontact=[select id,name from contact where name in:myname];
    delete mycontact;
}

Please help me.