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

C# random value from dictionary and tuple -

cgi - How do I interpret URLs without extension as files rather than missing directories in nginx? -

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