You need to sign in to do that
Don't have an account?
Creating Opportunity Partner records
I have added a Partner to an Opportunity from the Opportunity Detail page: partner > New .
However when I query the Opportunity Partner records as shown below , its giving me 2 records for the same Opportunity.
SOQL used :
Select o.Role, o.ReversePartnerId, o.OpportunityId, o.IsPrimary, o.AccountTo.Name, o.AccountTo.Id, o.AccountToId From OpportunityPartner o where o.OpportunityId ='006T0000005RLCR'
Result : it returns 2 records ( with is identical) where as the Opportunity has only one Opportunity Partner.
after investigation , I came to know that the AccountToId is different in both the records - (a) one is the Account that I have selected while creating the partner (b) other is the 'Account' to which the Opportunity is linked.
I have checked the Partner records as well. 2 records created for the Partner as well.
SOQL used :
Select p.SystemModstamp, p.Role, p.ReversePartnerId, p.OpportunityId, p.LastModifiedDate, p.LastModifiedById, p.IsPrimary, p.AccountTo.Name, p.AccountToId, p.AccountFrom.Name, p.AccountFromId From Partner p where p.OpportunityId ='006T0000005RLCR'
Now my question is ,
1. What is the functionality behind this ? why 2 records get created when we add a partner to an opportunity ?
2. I need to clone the 'Partner' related to an Opportunity . Out of the 2 records which one I need to clone ? and for that what will be the query ?
Any help will be appreciated . Thanks in advance.