You need to sign in to do that
Don't have an account?

Trigger on Note object not firing in production yet works fine in SB
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;
}
}
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;
}
}
Please like if it helps you