Salesforce SOQL 返回单个帐户的所有合作伙伴
我正在尝试查找具有同一合作伙伴的所有帐户。我是 SOQL 新手,无法进行连接,所以我不知所措。这是我得到的最接近的结果:
Select Name, Site, Status__c
FROM Account
WHERE Account.Id = Partner.AccountToId
AND Partner.AccountFromId = '0013000000bF5rtABC'
这不起作用。也许我的大脑无法正常工作,但我就是无法弄清楚这一点。我需要提取与“0013000000bF5rtABC”(或任何帐户)合作的所有帐户。
I am trying to find all the account that have the same partner. I am new to SOQL and I cannot do a join so I am at a loss. Here is the closest I have gotten:
Select Name, Site, Status__c
FROM Account
WHERE Account.Id = Partner.AccountToId
AND Partner.AccountFromId = '0013000000bF5rtABC'
This does not work. Perhaps my brain is not functioning, but I just cant figure this out. I need to pull all of the account who are partners with '0013000000bF5rtABC' (or whatever account).
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
以下查询将返回与 0013000000bF5rtABC 合作的所有账户。在 Salesforce 中,您需要使用内部查询的概念来执行联接。
Below query will return all accounts who are partners with 0013000000bF5rtABC. In salesforce you need to use concept of inner queries to perform join.