• Chris Kamarianakis
  • NEWBIE
  • 0 Points
  • Member since 2015

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 1
    Replies
I created a Note trigger that parses out a particular string from the title and writes it to a custom field within its parent opportunity. I have run several tests within the sandbox environment and the trigger works. When i move it to production however, the trigger does not even fire. i tried both the developer console and the eclipse environment with no luck. i tried starting from scratch and building a simple version of the trigger to make sure no errors would intervene yet the problem still exists. i even built a simular trigger yet on the attachment object and that worked. i checked to see if there are any pre existing triggers on the note object that may screw my trigger up and there arent any. i am now out of options and need asistance

simple  Note Trigger

trigger InvoiceListener on Note (after insert) {
    
  System.Debug('false: ');  

    /*    
 
   
    boolean b = MyMatcher.find();
     System.Debug('here');
    
    if(b == true){
        
    List<Opportunity> oppQuery = null;
       oppQuery = [SELECT Id, accountId FROM Opportunity WHERE Id= :pId ];
    Opportunity op =  oppQuery.get(0);
        System.Debug(op);
        //System.Debug('true: '+MyMatcher.group().substring(1));
        //DateTime d = datetime.now();
    //string timeStr = d.format('MMMMM dd, yyyy');
        //op.Invoice_Number__c = MyMatcher.group().substring(1);
        //op.Invoice_Date__c = Date.today();
         update op;

   
    }
    else{
      System.Debug('false: '+descrip );  
    }
  */
}

Simular working attachment trigger

trigger AttachmentTest on Attachment (after insert) {
String Title;
Id pId;

for(Attachment att: Trigger.new){
Title=att.Name;
pId=att.ParentId;
}



 

}
I created a Note trigger that parses out a particular string from the title and writes it to a custom field within its parent opportunity. I have run several tests within the sandbox environment and the trigger works. When i move it to production however, the trigger does not even fire. i tried both the developer console and the eclipse environment with no luck. i tried starting from scratch and building a simple version of the trigger to make sure no errors would intervene yet the problem still exists. i even built a simular trigger yet on the attachment object and that worked. i checked to see if there are any pre existing triggers on the note object that may screw my trigger up and there arent any. i am now out of options and need asistance

simple  Note Trigger

trigger InvoiceListener on Note (after insert) {
    
  System.Debug('false: ');  

    /*    
 
   
    boolean b = MyMatcher.find();
     System.Debug('here');
    
    if(b == true){
        
    List<Opportunity> oppQuery = null;
       oppQuery = [SELECT Id, accountId FROM Opportunity WHERE Id= :pId ];
    Opportunity op =  oppQuery.get(0);
        System.Debug(op);
        //System.Debug('true: '+MyMatcher.group().substring(1));
        //DateTime d = datetime.now();
    //string timeStr = d.format('MMMMM dd, yyyy');
        //op.Invoice_Number__c = MyMatcher.group().substring(1);
        //op.Invoice_Date__c = Date.today();
         update op;

   
    }
    else{
      System.Debug('false: '+descrip );  
    }
  */
}

Simular working attachment trigger

trigger AttachmentTest on Attachment (after insert) {
String Title;
Id pId;

for(Attachment att: Trigger.new){
Title=att.Name;
pId=att.ParentId;
}



 

}