So I have my Conga Invoice button on my Opportunity have a query of Select a,b,c from OpportunityLineItem where Opp.id. But I also need to get the other info from Custom Object(Property) This property has a relationship from Opportunity not on OLI. How can I accomplish it ? Will be my based object is Property now? or still OLI.
The only single query that will work is
Select Id, (Select ... From OpportunityLineItems), (Select .... From Property__r) From Opportunity Where Id = :oppId
This will return the Opportunity, the child OLI, and the child Properties.
The Conga invoice template can thus show a header and two distinct tables of line items and properties.