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
Post a Comment