0

I have two custom objects, Team (parent) and Player (child). I'm using Schema Explorer in the Force.com IDE to understand the data that exists in those objects. I tried the following simple query as a starting point:

SELECT (SELECT Player__c.Email__c from Team__c.Players__r) 
FROM Team__c 
WHERE Name = '14104'

The result appears like this:

Results from query

How do expand these results so that I can actually see the data instead of Players__r(1)?

2 Answers 2

2

Your query could be simplified to:

SELECT (SELECT Email__c from Players__r) 
  FROM Team__c 
  WHERE Name = '14104'

Using Eclipse IDE V30, view the screen shot to see child record values:

enter image description here

3
  • That's it! I had no idea double clicking would open a new results window. In my experience, whenever I've clicked into a result in Scheme Explorer (like say to try to copy an id), Eclipse freezes up and I have to Force Quit.
    – eyedar
    Commented Oct 29, 2014 at 18:05
  • Ironic: when I closed the child records window, Eclipse froze. :(
    – eyedar
    Commented Oct 29, 2014 at 18:07
  • 1
    hmm -- not for me, I use Eclipse 4.2 (Win 64) and Force.com IDE v 30. There are alternatives to using Eclipse IDE Schema Explorer - SOQL Explorer (Mac), Developer Console, SFDC Workbench
    – cropredy
    Commented Oct 29, 2014 at 18:11
-1

I assume you are trying to view the columns of the parent object. Why don`t you specify the columns to be retrieved, like this:

SELECT Id, Name, ( SELECT Id, Name FROM Players__r ) FROM Team__c WHERE Name '14104'

This query return a set of Teams, and withing each Team, a query result set of Player fields containing the Player information from the subquery

1
  • No. I'm trying to view Email__c in the child object.
    – eyedar
    Commented Oct 29, 2014 at 17:17

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .