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

help with compiler error in trigger
Hi all - My trigger and handler class is a s below. I'm getting error when I try to save the trigger
error message Compile Error: Method does not exist or incorrect signature: [ET_ContactTriggerHandler].onInsertAndUpdate(List<Contact>, List<Contact>, Map<Id,Contact>, ContactTrigger.triggeredAction)
error message Compile Error: Method does not exist or incorrect signature: [ET_ContactTriggerHandler].onInsertAndUpdate(List<Contact>, List<Contact>, Map<Id,Contact>, ContactTrigger.triggeredAction)
trigger ContactTrigger on Contact (after insert, after update,before delete) { ET_ContactTriggerHandler EThandler = new ET_ContactTriggerHandler(Trigger.isExecuting, Trigger.size); public enum triggeredAction {afterInsert, afterUpdate , beforeDelete} if(Trigger.isInsert && Trigger.isAfter){ System.debug('*******INSERT' ); EThandler.onInsertAndUpdate (Trigger.old, Trigger.new, Trigger.oldMap, triggeredAction.afterInsert) ; } }
public without sharing class ET_ContactTriggerHandler { private boolean m_isExecuting = false; private integer BatchSize = 0; public ET_ContactTriggerHandler (boolean isExecuting, integer size){ m_isExecuting = isExecuting; BatchSize = size; } public enum triggeredAction {afterInsert, afterUpdate , beforeDelete} public void onInsertAndUpdate (Contact[] oldContacts, Contact[] updatedContacts, Map<ID, Contact> OldMap, triggeredAction ta) { //do something } }

Try this, the enum from the trigger is not the same as the enum from your class.