Call Method from trigger to apex
3. Call Method from trigger to apex and with list<Account> and Map<Id,Account>
In Apex class:
In Apex class:
public class UpdateAccTriggerHandler {In Trigger :
public void updateAccountTest(List<Account> newAccList, Map<Id,Account> oldMap){
for(Account acc:newAccList){
//your code...
}
}
}
UpdateAccTriggerHandler updateAcc = new UpdateAccTriggerHandler ();
updateAcc .updateAccountTest(Trigger.New, Trigger.oldMap);
Comments
Post a Comment