salesforce - SOQL Get Name from nested SELECT statement -


i have soql query grabbing information opportunity in salesforce , grabbing contactid of related contact role. displaying opportunities have different child object of type. extract , display name of contact role in table. suggestions?

select id, name,  (select contactid opportunitycontactroles isprimary = true)  opportunity  id in  (select opportunity_id  opportunity_child  opportunity_child_picklist = 'specific item') 

i 'name' field contactid found opp. contact roles table , display opportunity id well.

you can follow contact relationship in subquery, e.g.

select id, name,  (select contactid, contact.name opportunitycontactroles isprimary = true)  opportunity  id in  (select opportunity_id  opportunity_child  opportunity_child_picklist = 'specific item') 

Comments

Popular posts from this blog

database - VFP Grid + SQL server 2008 - grid not showing correctly -

jquery - Set jPicker field to empty value -

.htaccess - htaccess convert request to clean url and add slash at the end of the url -