My requirements is to repeat a table in a nested region. There is a conga query limitation of querying grandchild records. I created 2 queries.

This is my templates expected value:

Parent 1 :Child 1 :Child 2 :Child2.Grandchild Parent 2 :Child 1 :Child 2 :Child2.Grandchild

but whenever i inject the tablestart and tableend of the 2nd SOQL , it appears multiple times on the Parents details even though it is not connected.

Thanks in advance for possible workaround.


So there is no limitation around querying grandchild data specific to Conga, the querying of grandchild data in a nested query is a limitation of SOQL. That said, you could easily build a tabular query that will capture fields from all three levels and then group against parent detail on the template.

So while the Conga Query Builder doesn't expose grand parent level information, you're welcome to build your own queries to pull data.


SELECT Opportunity.Account.Parent.Name, Opportunity.Account.Name, Opportunity.Account.Type, Opportunity.Custom_Lookup__r.Name, Opportunity.Amount, Opportunity.StageName, Opportunity.Name, Opportunity.CloseDate, PricebookEntry.Product2.Name, PricebookEntry.Product2.Family, PricebookEntry.Product2.Description, Quantity, Salesprice, Totalprice FROM OpportunityProduct WHERE Opportunity.Account.Id = '{pv0}'

So in the above example, I can start at the lowest level and select fields as many as 5 relationships up and could group against any field selected in the query. Your challenge is specific to the with/out grandchild. To accommodate that, I would build your query with the CHILD as the "FROM" clause.

SELECT Parent__r.Name, Name, Custom_Field__c, (SELECT Name, Type__c FROM Grandchild) FROM Child WHERE...

You can absolutely include r. lookup values in the outer query.

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.