• abhi patil
  • NEWBIE
  • 10 Points
  • Member since 2023

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 0
    Replies
trigger AccountTriggerDelete on Account (before delete, after  delete, after undelete) {
    
    if (trigger.isbefore){
        if(trigger.isdelete){
            
            //Before deleting account record, retrieve all review records
            // delete review records related to account
            List<review_c> rvlist = [select id, Account_c from review_c where Account_c IN :trigger.old];
            
             delete rvlist;
  public void newinsert(string oppName, date newd){
        
        Opportunity opp = new opportunity();
        
        opp.Name = oppName;
        opp.Amount= 344556;
        opp.CloseDate= newd;
        
        insert opp;