0

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.

  • Is Property a parent of Opportunity or a child of Opportunity? If the latter, you can't go up from OLI to Oppo and then down to Property in a single query – cropredy Oct 3 '19 at 3:47
  • Hi, child of opportunity. I have master-relationship on my property -> opportunity – Gavin Oct 3 '19 at 5:32
0

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.