+ Start a Discussion
Manoj ParidaManoj Parida 

Getting Opportunities without Partners

Could someone give an idea to retrieve Opportunities without having a partner in salesforce using SOQL or Apex? I have many duplicate opportunities and want to filter out those without having any partners.

Shashikant SharmaShashikant Sharma
You could filter on field "PartnerAccountId" on opportunity

List<Opportunity> listPartnerOpp = [ Select Id from Opportunity Where PartnerAccountId !=: NULL ];

you could query OpportunityPartner to get more information about partner 


let me know if you have any questions.