开发者

Salesforce SOQL return all partners of single account

开发者 https://www.devze.com 2023-03-09 23:06 出处:网络
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:

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 =开发者_StackOverflow中文版 '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).


Below query will return all accounts who are partners with 0013000000bF5rtABC. In salesforce you need to use concept of inner queries to perform join.

Select Name, Site, Status__c
FROM Account 
where ID IN 
(Select AccountToId from Partner where AccountFromId = '0013000000bF5rtABC')
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号