function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Rajan Vegesna 3Rajan Vegesna 3 

Trigger working on sandbox but not on Production, can any one help me with this

trigger updateOpponAttendance on Attendance__c (After insert,After Update) {
    for(Attendance__c att : Trigger.new){
        Opportunity opp = new Opportunity();
        if(att.Lead__c != Null && 
           att.CourseId__c != Null && 
           att.Course_Start_Date__c != Null){
        if(att.Lead__c == opp.Lead__c){
           if(att.CourseId__c == opp.MysqlCourseId__c && 
              att.Course_Start_Date__c == opp.Course_Date__c &&
              opp.Dup_Opp__c == False){
              att.Opportunity__c = opp.Id;
              }
    }
}
}
}
Yury BondarauYury Bondarau
Rayan,
Were you able to save trigger on production?
If yes, can you check salesforce debug log for exceptions?
Rajan Vegesna 3Rajan Vegesna 3
Hi Yury, Thanks for your quick reply, i didn't find any exceptions in my debug logs.
Yury BondarauYury Bondarau
Can you check if your trigger active? There is an checkbox on trigger edit interface.