public with sharing class AccountTriggerHandler {
public static void OnBeforeInsert(List<Account> newAccounts){
}
// some more logic
}
Your trigger will be:
trigger AccountTrigger on Account (after delete, after insert, after undelete,
after update, before delete, before insert, before update) {
AccountTriggerHandler.OnBeforeInsert(Trigger.new); }
Hi Neha,
Suppose this is your class
public with sharing class AccountTriggerHandler { public static void OnBeforeInsert(List<Account> newAccounts){ } // some more logic }
Your trigger will be:
Highly recommended are the various trigger frameworks http://krishhari.wordpress.com/2013/07/22/an-architecture-framework-to-handle-triggers-in-the-force-com-platform/ that the aforementioned post outlines.
A bit higher cost effort to set up the first time but they have huge long run pay off for anything but the most trivial systems