Reputation: 23
Having issues retrieving data from 2 different SF objects, a custom object and the accounts object. There is also a field in the Contact object, but first i'm trying to tackle Jobs DB and Account object. Here is the query without the join:
Contact__c and Practice_Name__c are both type lookup. I'm not sure what these two values returned are... hopefully keys to be used in where clause? Here you can see relationships:
Can anyone show me a join that would return the query above with field names rather than foreign keys?
Here is the lookup query with the foreign key for Practice Name above:
Upvotes: 0
Views: 483
Reputation: 7371
For accessing to fields of lookup objects you don't need join query, you can just these fields in one query, for instance:
SELECT Name, Email__c, Contact__r.Name, Practice_Name__r.Name FROM Job_Database__c WHERE Status__c = 'Active'
Upvotes: 2