0

I was stuck at a point where I need to get the Contacts created by Lead conversion. Can someone tell me how to query those Contacts when a lead is converted? I am new to Salesforce so please help me do this.

1

The basic query would be:

SELECT Id FROM Contact
WHERE Id IN (SELECT ConvertedContactId FROM Lead)
2
  • I think this would still return Contacts that had a Lead converted into an existing Contact (which may or may not have been originally created from lead conversion), no? An edge case, to be sure, but it might be relevant. Mar 25 '20 at 17:35
  • @ToddSprinkel You're right, of course. There's not a good way do to that in a query.
    – sfdcfox
    Mar 25 '20 at 19:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy