Activity Forums Salesforce® Discussions How can we create a relationship with conga composer in Salesforce?

  • Ankit

    Member
    March 22, 2018 at 9:55 am

    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 🙂

  • Neha

    Member
    March 22, 2018 at 10:47 am

    Hi Ankit,

    Can you please provide query example for same?

  • Ankit

    Member
    March 22, 2018 at 11:00 am

    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 🙂

  • Neha

    Member
    March 22, 2018 at 11:05 am

    Hi Ankit,

    Thanks for your response.

    Can we fetch grandchild data in document through Congo Composer?

  • Ankit

    Member
    March 27, 2018 at 1:52 pm

    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

     

  • PRANAV

    Member
    March 28, 2018 at 8:43 am

    Hi

    Can we also send documents on the child and grandchild records using Congo Composer?

  • Archit

    Member
    March 28, 2018 at 10:48 am

    How can I update my Conga Composer button to pass any desired value to a report in salesforce?

  • Archit

    Member
    March 28, 2018 at 10:48 am

    Please provide any example for the above if possible.

  • Neha

    Member
    March 29, 2018 at 6:30 am

    Hi Archit,

    You can also post the separate question for same for faster response.

  • Rahul

    Member
    March 29, 2018 at 8:24 am

    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.

  • Neha

    Member
    March 29, 2018 at 10:41 am

    Hi Rahul,

    Here we are discussing Congo Composer.

  • Aman

    Member
    August 16, 2018 at 7:38 am

    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.

  • Parul

    Member
    September 20, 2018 at 6:36 pm

    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.

  • shariq

    Member
    September 20, 2018 at 10:17 pm

    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.

  • Aman

    Member
    September 21, 2018 at 9:55 am

    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

  • Ala King

    Member
    October 9, 2019 at 8:53 am

    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