I'm using a SOQL to query the LKPlookup relationships.
Primary Object: Opportunity
Secondary Object: Purchase__c.
From purchase__c we have a LKPlookup to opportunity.
Field Name: Opportunity__c
Child Relationship Name: Purchases2
SOQL query:
for (Opportunity opp : [select Id, Name, (select id from Purchases2__r where Count__c>0) from Opportunity where Id IN :oppIds])
whats wrong with my query? getting error below:
If you are attempting to use a custom relationship, be sure to append the '__r' after the custom relationship name.
If you are attempting to use a custom relationship, be sure to append the '__r' after the custom relationship name.