Invoke Apex Class from Trigger #inSalesforce
public class SampleClass{
public void SampleMethod(List<Account> listAccount, Map<Id, Account> mapAccount){
}
}
public void SampleMethod(List<Account> listAccount, Map<Id, Account> mapAccount){
}
}
trigger SampleAccount on Account (before insert){
for(Account a : trigger.new){
SampleClass objt = new SampleClass(trigger.new, trigger.newmap);
objt.SampleMethod();
}
}
for(Account a : trigger.new){
SampleClass objt = new SampleClass(trigger.new, trigger.newmap);
objt.SampleMethod();
}
}
Comments
Post a Comment