• Cathy_022
  • NEWBIE
  • 0 Points
  • Member since 2012

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 2
    Replies

Hello,

 

I have a trigger on Account and it is being called twice I am do not know how to figure this out.

 

Here is my trigger code

 

 

trigger AccUpdateRates on Account (before insert, before update) {
  for(Account a: Trigger. new){
    if(Trigger.isUpdate){
      Account beforeUpdate = System.Trigger.oldMap.get(a.Id);
       if(a.RecordTypeId == '012500000001LcY' && a.Termination_Date__c == null){
        }
     }
     if(Trigger.isInsert){
        if(a.RecordTypeId == '012500000001LcY' && a.product__c != null){
              AccList.add(a);
              prodIDs.add(a.product__c);
          }    
     }
    if(accList.size()>0)
      AccountUpdateRates.UpdateProductRates(AccList, ProdIDs);

   
   }


}

I see that I have Kugadd package installed and have similar trigger on account. 

   Trigger - AccountBeforeInsertBeforeUpdate - installed package Kugamon Account/Contact Sync

 

 

I put print statement in couple of place in my class that is being called from trigger. 

 

When I look at the debug log I see the following statement twice

16:05:48.163|CODE_UNIT_STARTED|[EXTERNAL]|01qP00000004GdG|AccUpdateRates on Account trigger event BeforeUpdate for [0015000000XLDub]

Any suggestions I can find what is my causing trigger to be called twice?

 

Thanks

Uma