Skip to main content
Conga Support

How to Create a Conga Composer List View button

 Javascript is not supported in Salesforce lightning. Using a Javascript button is not currently a feature available to use in Lightning experience. Conga cannot support customized code. Due to the complicated nature of supporting programmers and programming languages, the integration of Conga with Visualforce, Apex and Javascript (or other programming languages) is not supported.

You can build a List View button that allows the end-user to dynamically select the child records they would like to include in a Conga Composer operation using checkboxes.

Create a List Button on the Child object

  1. Change your button settings to:
  • Behavior – Execute JavaScript
  • Content Source – OnClick JavaScript
  1. Copy the below text and paste it in to your button.  Be sure to update the Object Type in the first line to the Child Object that is the same Object as the Object your list button is on.  Also change the field in the seventh line to the Parent ID of the Object your button is on.
var ids= {!GETRECORDIDS( $ObjectType.OpportunityLineItem )};
var idsReport=ids.join("|");
var idsQuery=ids.join("'|'");
var CongaURL = "https://composer.congamerge.com" +
"?sessionId={!$Api.Session_ID}" +
"&ServerUrl={!$Api.Partner_Server_URL_80}" +
"&Id={!Opportunity.Id}" + 
"&ReportId=00OE0000000P57r?pv0=" + idsReport +
"&QueryId=a03o000000JuspY?pv0='" + idsQuery +"'";
window.open( CongaURL, "Conga", "width=700,height=550,menubar=0" );
  1. Create a query with all of the child fields you want to include. The WHERE clause should be the Child ID updated to IN ({pv0})

Example Query for Opportunity Product

SELECT Description, ListPrice, Product_Family__c, Quantity, UnitPrice, TotalPrice
FROM OpportunityLineItem
WHERE Id IN ({pv0})
  1. Add button to layout.
  2. Edit the Parent Object Page Layout. In edit mode go to your child related list and click Properties (the tool icon).
  3. Open the button options at the bottom of the pop- up, add the button and save.