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

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

| improve this answer | |
  • 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 Oct 29 '14 at 18:05
  • Ironic: when I closed the child records window, Eclipse froze. :( – eyedar Oct 29 '14 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 Oct 29 '14 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

| improve this answer | |
  • No. I'm trying to view Email__c in the child object. – eyedar Oct 29 '14 at 17:17

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.