Activity › Forums › Salesforce® Discussions › How can we create a relationship with conga composer in Salesforce?
Tagged: Conga Composer, Conga Report, Custom Relationship, Relationship Object, Salesforce Integration with Conga, Salesforce Relationships
-
How can we create a relationship with conga composer in Salesforce?
Posted by Adarsh on March 22, 2018 at 9:45 amHow can we create a relationship with conga composer?
Ala King replied 5 years, 2 months ago 10 Members · 16 Replies -
16 Replies
-
Hi Adarsh,
For relationships, we need to add conga queries.
For that Open conga composer then go to Conga Query tab.
1.Click New. Type name and description, leave the SOQL Select Statement field blank.
2.Click Save.
3.Click Conga Query Builder.From Conga Query you can build a relationship for that object with the related object, conga query provide automatic generation of SOQL Statement we just need to choose object and fields.
Hope it may help 🙂
-
Hi Neha,
Here is the example of conga query
SELECT Opportunity.Name, Opportunity.Type, Opportunity.Amount, Opportunity.CloseDate, Opportunity.StageName, (Select Contact.name from OpportunityContactRoles where IsPrimary = true) FROM Opportunity Where Opportunity.Account.Id = '{pv0}' order by Opportunity.CloseDate asc
PV (or pv) stands for the parameter value, which is a value that can be passed into a filter on a Salesforce report or Conga query. It used in advance filter of conga query to take Value dynamically.
Hope it may help 🙂
-
Hi Ankit,
Thanks for your response.
Can we fetch grandchild data in document through Congo Composer?
-
Hi Neha,
Yes, we can!!
We need to add a Conga Query so that it access the GrandChild field of that parent object by using where clauses in the query.
I have an example for better understanding,
SELECT CTTPM2012__Sales_Plan__r.CTTPM2012__Business_Plan__c, CTTPM2012__Sales_Plan__r.CTTPM2012__Sales_Plan_Name__c, CTTPM2012__Sales_Plan__r.CTTPM2012__Status__c, CTTPM2012__Sales_Plan__r.Name, CTTPM2012__Business_Plan_ID__c, CTTPM2012__Item_Name__c, CTTPM2012__Sales_Plan__c, Name FROM CTTPM2012__Sales_Plan_Item__c WHERE CTTPM2012__Business_Plan_ID__c = '{pv0}'
In the above query, CTTPM2012__Business_Plan_ID__c - Parent Object Id , CTTPM2012__Sales_Plan_Name__c - Child Object Name and CTTPM2012__Sales_Plan_Item__c - Grand Child Object
Hope it may help you 🙂
Thanks
-
Hi
Can we also send documents on the child and grandchild records using Congo Composer?
-
How can I update my Conga Composer button to pass any desired value to a report in salesforce?
-
Hi Archit,
You can also post the separate question for same for faster response.
-
Hi Neha,
I am currently working on Conga Composer and its a great tool for document generation. But what I found on your response that you are asking about Congo or Congo Composer.I think you should specify the Name correctly as its very important for others to reply on them.
-
Hi,
How can we pass the Ids present in a salesforce report to conga query. For Eg:- Select (Fields) From ObjectA Where Id In({pv1}). pv1 should get Id values from a salesforce report meaning I should be able to write a conga query on the report that contains my filtered data.
Please reply when you get this.
-
Hi,
we need to add conga queries in conga composer.
Open conga composer then go to Conga Query tab.
1.Click New. Type name and description, leave the SOQL Select Statement field blank.
2.Click Save.
3.Click Conga Query Builder.From Conga Query you can build a relationship for that object with the related object, conga query provide automatic generation of SOQL Statement we just need to choose object and fields.
-
Hi,
I found this online -
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.
Example:
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.
Hope this helps.
-
Hi All,
You can use apex code to invoke conga composer and it makes the job easier instead of building queries every now and then. You can make it dynamic to a whole different level. Conga Composer is just like an object after you install it as a package in your org. You can use them as other Salesforce objects to create and fulfill your requirements.
Thanks,
Aman
-
Hi all I have a question about conga query So I got a Proposal button on my oppty. Had a existing query for OLI : select .. from Opplineitem where Opp Id. But I also need to fetch the data from custom object (abcc). Abc object has master-relationship between oppty. How can I fetch the data from Abc ? Will be my based object is abc? or still on opportunity ?
I tried this : Select Id ( Select name from OLI), (Select abcname from abcc) from Opportunity where ID = 'pv0' when I run it gives me invalid type on my template builder
Log In to reply.
Popular Salesforce Blogs
All You Need to Know About Recursive Triggers in Salesforce
What are Recursive Triggers? In Salesforce, a Recursive Trigger refers to a situation where a trigger on an object causes another trigger to fire on…
Salesforce Forms Integration Without Code
Salesforce Forms - Drag and Drop - Dynamic - NO CODE If you’ve been looking for a way to build dynamic Salesforce forms with no…
Digitization - The Way Forward For Nonprofits | Salesforce Guide
Digitization is booming in every industry, big or small, after the COVID-19 hit. As companies and organizations are working remotely, this entails signing off the…