Quick Information:
- Using SOQL via the Enterprise SOAP API
- This is a .NET 4.5 application, C#
- This is in my Salesforce sandbox
- I'm using Force.com Explorer
- I'm new to StackExchange AND Salesforce. Be nice :)
Objective: To get all contacts, along with any matching leads who have been converted (they have a Lead.ConvertedContactId value).
I'm trying to left join Contacts on to Leads. The documentation seems clear enough, and I think I wrote the query correctly, but the results aren't as expected. Note in the screenshot below that no Leads__r values exist. Odd. Please scroll down to the next screenshot.
I ran a query to prove that the Lead records exist for the contact IDs (both queries use the same IDs). Please see the screenshot below to view the result set. Since I'm getting results, I expected the query from the first screenshot to produce objects of type Leads__r, but that doesn't work. Please scroll down to my question.
Question: Can someone help me understand what I'm missing? Is this a programmatic/syntax problem, or did I not convert the Lead to a Contact correctly in my sandbox? If it's the latter, then what might I have done wrong?
Thank you!
Tyler