• Niwed
  • NEWBIE
  • 0 Points
  • Member since 2020

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 1
    Replies
The opportunity Stage name is modified as closed own then set close date as today and customer as a new customer using trigger(Before Update)
  • October 13, 2020
  • Like
  • 0
When a new record is created in account object before a new record is inserted into account, delete all the contact records with this account name
  • October 07, 2020
  • Like
  • 0
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.