Monday, March 9, 2020

Check Lead Status picklist values marked as converted or not In Apex

In Order to retrieve the Lead Status Picklist Values we have Standard Salesforce object "LeadStatus".

LeadStatus object represents the status of a Lead, such as Open, Qualified or Converted.

This object represents a value in the lead status picklist (see Lead Status Picklist). The lead status picklist provides additional information about the status of a Lead, such as whether a given status value represents a converted Lead. Query this object to retrieve the set of values in the lead status picklist, and then use that information while processing Lead objects to determine more information about a given lead.

SOQL
SELECT Id, MasterLabel FROM LeadStatus WHERE IsConverted = true

Result

Resource
LeadStatus

No comments:

Post a Comment