• Sandeep Sahoo 16
  • NEWBIE
  • 0 Points
  • Member since 2017

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 1
    Replies
Hello everyone, I am new to coding and I recently inherited an org with an AccountTrigger that is blowing out my CPU Limits. I could use some assistance understanding exactly what it is doing, as the existing purpose comments don't really provide too many insights. 

Trigger Name   :  AccountTrigger
Purpose        :  Contains all actions performed by Account Trigger. 

trigger AccountTrigger on Account (after delete, after insert, after undelete, after update, before delete, before insert, before update) {
    accountTriggerHandler handler = new accountTriggerHandler();
    
  /* Before Insert */
    if(Trigger.isInsert && Trigger.isBefore) {          
      //handler.fillOppAmount(Trigger.new, null);    
    }
    
    /* After Insert */
    else if(Trigger.isInsert && Trigger.isAfter) {
        //handler.createOpportunity(Trigger.new, null);
    }
    
    /* Before Update */
    else if(Trigger.isUpdate && Trigger.isBefore) {          
        //handler.fillOppAmount(Trigger.new, Trigger.oldMap);
    }
    
     /* After Update */
    else if(Trigger.isUpdate && Trigger.isAfter) {
        //handler.createOpportunity(Trigger.new, Trigger.oldMap);
        //handler.updateOpportunity(Trigger.new, Trigger.oldMap);
    }
}