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
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