+ Start a Discussion
Imtiaz PashaImtiaz Pasha 

Hi All, I have implement apis my code looks fine in the lead trigger i have written code my future handler not running for few records but other records is running , anyone help ?

Below is my lead trigger code :

if(Trigger.isAfter && Trigger.isUpdate){
        if(Trigger.old[0].Status !='Converted' && Trigger.new[0].Status =='Converted'){
            LcsAPI.LCScallServer(Trigger.New[0].id) ;   
       }
   }  


 
AnudeepAnudeep (Salesforce Developers) 
Mostly the criteria is not being met for those records. You need to put system debug statements to troubleshoot this further
 
if(Trigger.isAfter && Trigger.isUpdate){
System.debug('Trigger executed');
        if(Trigger.old[0].Status !='Converted' && Trigger.new[0].Status =='Converted'){
           System.debug('Status is' + Trigger.old[0].Status);
            LcsAPI.LCScallServer(Trigger.New[0].id) ;   
       }
   }

Let me know if it helps