You need to sign in to do that
Don't have an account?
Support 3743
Finding partner related to an opportunity
I'm having trouble understanding the relationship between Partner and Opportunity. I want to access the data of the partner related to an opportunity. Opportunity has a field called PartnerAccount:
However when I use this code: SELECT PartnerAccount.Name FROM Opportunity
There is an error: No such relation 'PartnerAccount' on entity 'Opportunity'
Can anyone tell me why? And how could I access the information in partner when I'm querying opportunity? Thanks!
However when I use this code: SELECT PartnerAccount.Name FROM Opportunity
There is an error: No such relation 'PartnerAccount' on entity 'Opportunity'
Can anyone tell me why? And how could I access the information in partner when I'm querying opportunity? Thanks!
It looks like Partner is a custom object? if yes, then you refere to customer object with __c and relationship will be represented by __r. Below is a query example considering the scenario
Partner -- child
opportunity -- parent
select name, opportunity__r.name
from
partner__c
By Falcon100 (if this was helpful, please provide feedback)
if it is not a customer object then you can use the object name directly
select name, opportunity.name
from
partner
By Falcon100 (if this was helpful, please provide feedback)