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
notsosmartnotsosmart 

apex reference to converted leads

My procedure needs to filter out converted leads from my lookups.  I've noted that the Lead status field piciklist includes a 

field Labeled Converted but I don't know the coding reference for my SOQL statement.

 

If I filter by the status values that are checked as converted, it still gets one that is not checked on the status.  

 

Id like to understand how this work anyway in order to write clean code because I'm thinking there is another reference that is more reliable.

 

Thanks.

Best Answer chosen by Admin (Salesforce Developers) 
crop1645crop1645

[select id, firstname, lastname, email from Lead where isConverted = false]

All Answers

crop1645crop1645

[select id, firstname, lastname, email from Lead where isConverted = false]

This was selected as the best answer
notsosmartnotsosmart
Thanks. That's it. I forgot about that convention.