Skip to content

Instantly share code, notes, and snippets.

@arun12209
Created June 26, 2022 13:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save arun12209/9e99f2f5b0ce54c2dccc3cfeb8d5df7c to your computer and use it in GitHub Desktop.
Save arun12209/9e99f2f5b0ce54c2dccc3cfeb8d5df7c to your computer and use it in GitHub Desktop.
AccountTriggerHandler.cls
public without sharing class AccountTriggerHandler implements TriggerHandler{
private boolean triggerIsExecuting;
private integer triggerSize;
public AccountTriggerHelper helper;
public AccountTriggerHandler(Boolean triggerIsExecuting, integer triggerSize) {
this.triggerIsExecuting = triggerIsExecuting;
this.triggerSize = triggerSize;
this.helper = new AccountTriggerHelper();
}
public void beforeInsert(List<Account> newAccounts){
//call AccountTriggerHelper methods
}
public void beforeUpdate(List<Account> newAccounts, List<Account> oldAccopunts, Map<Id,sObject> newAccountMap, Map<Id,sObject> oldAccountMap){
//call AccountTriggerHelper methods
}
public void beforeDelete(List<Account> oldAccounts, Map<Id,SObject> oldAccountMap){
//call AccountTriggerHelper methods
}
public void afterInsert(List<Account> newAccounts, Map<Id,SObject> newAccountMap){
//call AccountTriggerHelper methods
}
public void afterUpdate(List<Account> newAccounts, List<Account> oldAccounts, Map<Id,SObject> newAccountMap, Map<Id,SObject> oldAccountMap){
//call AccountTriggerHelper methods
}
public void afterDelete(List<Account> oldAccounts, Map<Id,SObject> oldAccountMap){
//call AccountTriggerHelper methods
}
public void afterUndelete(List<Account> newAccounts, Map<Id,SObject> newAccountMap){
//call AccountTriggerHelper methods
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment