You need to sign in to do that
Don't have an account?
Rajan 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;
}
}
}
}
}
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;
}
}
}
}
}
Were you able to save trigger on production?
If yes, can you check salesforce debug log for exceptions?