获取与特定机会相关的个人客户

问题描述 投票:0回答:1

我得到了一个机会,我想在上面获取相关人员帐户

这是我的 soql:

SELECT ID, Name, (SELECT Id, Name FROM Opportunities WHERE Id='{pv0}') FROM Account WHERE IsPersonAccount=True

它返回所有个人帐户,我如何将其过滤为特定的 opp 记录?

salesforce soql
1个回答
0
投票
select id, name
from account
where id in (select accountid from opportunity where id='006...')
© www.soinside.com 2019 - 2024. All rights reserved.