function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Geoffrey CGeoffrey C 

I need to create a trigger that calls an Apex Class if a Rating Is 'Warm' or 'Hot' and is a has a Lead.RecordType of 'Marketing'.

Help me create this a trigger that calls an apex class if an Apex Class if a Rating Is 'Warm' or 'Hot' and is a has a Lead.RecordType of 'Marketing'.

Trigger WarmLeadd on Lead (before insert{

}
Raj VakatiRaj Vakati
try like this 
 
trigger test on Lead (after insert) {
	
	Set<Id> accIds = new Set<Id>(0 ;
	
 for(Lead leads:System.Trigger.new) {
  if (leads.RecordType =='Marketing'){
	  
	  accIds.add(leads.AccountId);
  }
 
}

AccountHelper.handlerAccount(accIds);
}
 
public class AccountHelper {
	
	public static void handlerAccount(Set<Id> accIds){
		
		
		
		
	}
	
	
	
	
}