SOQL Query outputting relationship as column.
Issue #2356
resolved
In the SOQL query window, if you run a query outputting a relationship field it will output a blank column with the name field__r and the actual field e.g. field__r.relationshipField.
This seems to only happen when the relationship field has no values (but might also contain values).
Here’s an example of a query I just ran:
SELECT Id, Tenant__r.Name
FROM Opportunity
Comments (3)
-
repo owner -
repo owner - changed status to open
-
repo owner - changed status to resolved
Resolving due to lack of activity/diagnostic info. If it's still reproducible, please feel free to reopen with diagnostic logs.
- Log in to comment
Justin, I believe that’s what the API is returning in its response. That’s not saying that IC2 couldn’t try to clean it up a bit, but let’s confirm that first. You can see the raw SOAP response by adding the following to Help>Diagnostic Tools>Debug Log Settings:
and then restarting the IDE (needed for the SOAP toolkit to change its logging settings unfortunately) and reproducing the behavior. You should see the exact SOAP request and response in your
idea.log
file. My guess is that it includes those intermediate relationship fields, though it’d be good to know that either way.Note that you’ll want to remove the entries above--minimally the
!trace
entry--after getting the logged information that you want. Otherwise it’s going to continue logging all API interactions with the org which is both inefficient and a security risk. Again, you’ll need to restart the IDE process after removing those entries.Feel free to paste the SOAP response for the executed query into a comment here so I can also see what’s being returned.