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
Max SamofalovMax Samofalov 

Trigger doesn't contain Lead.Status field value if it was set on Lead Conversion page

Hi guys. Found that after update trigger for Lead does not contain Lead status that was set in Converted Lead page.
If a Lead status was set before conversion, its value is accessible from trigger. But Converted Status from Convert Lead page just sets status for lead without firing a trigger or workflow.

Is there a way to grab value from Converted Status field of Convert Lead page?
 
Best Answer chosen by Max Samofalov
ManojjenaManojjena
Hey Max,

I have created a trigger in my org and tested it is working finr for me .I have converted a lead and trigger get fire ,
trigger checkOnConversion  on Lead (before update ,after update ) {
   for (Lead ld :trigger.new ){
     System.debug('*********'+ld.Status);
   }
}

04:49:59.106 (1106406616)|USER_DEBUG|[3]|DEBUG|*********Closed - Converted



Please check below code an dlet me know if any issue .I have added teh debug statement as well . 

All Answers

ManojjenaManojjena
Hey Max,

I have created a trigger in my org and tested it is working finr for me .I have converted a lead and trigger get fire ,
trigger checkOnConversion  on Lead (before update ,after update ) {
   for (Lead ld :trigger.new ){
     System.debug('*********'+ld.Status);
   }
}

04:49:59.106 (1106406616)|USER_DEBUG|[3]|DEBUG|*********Closed - Converted



Please check below code an dlet me know if any issue .I have added teh debug statement as well . 
This was selected as the best answer
Max SamofalovMax Samofalov
Thank you for reply. Found that this was an org-specific issue. It occured on 1 sandbox only. The sandbox didn't have 'Enforce Validation and Triggers from Lead Convert' checkbox. Don't know how it is connected, but still everything works fine in all other orgs.