I'm relatively new to apex, so maybe someone can tell me what I'm doing wrong with this code here. I'm trying to get a trigger to fire when I create a new object. I've created a separate class that it will make a call to.
trigger LearningTriggers on le_Object__c (after insert, after update) {
if(Trigger.isAfter && (Trigger.isInsert || Trigger.isUpdate)){
TestingTrigger t = new TestingTrigger();
t.changeObject(Trigger.new, Trigger.old);
}
}
This is the method in the class that I am calling with the trigger code.
public with sharing class TestingTrigger {
public void changeObject(le_Object__c[] newObj, le_Object__c[] oldObj){
//some code here
}
}
For some reason, this line in the trigger code "t.changeObject(Trigger.new, Trigger.old);" is throwing this error "Save error: Method does not exist or incorrect signature: [TestingTrigger].changeObject(LIST).
It looks like there might be something wrong with the call to the method, but I'm not sure. I know the name of the method and the number of parameters in the call is correct. Can anyone tell me what's going on here? Is there something that I'm missing?