Skip to main content
Conga Support

Launching a Composer Button from a Salesforce.com Console View

This technique creates a Composer window that will not redirect the original console view page.

There are two main parts to this process:

  • Create a Visualforce page
  • Create button that calls the Visualforce page

Due to their complicated nature, the integration of Conga with JavaScript, Visualforce and Apex (or other programming languages) is not supported.

The variable CongaURL can be modified to point to a different environment (staging) if necessary.

Note that the commented out line, //var closeFirstWindow = window.open('','_self').close();, controls the "parent" window and whether that window closes itself after opening the Composer window. An Adobe eSign solution run from the console needs this line commented out (as shown) to run properly. However, an email solution run from the console could run with that line active.

The security settings for this Visualforce page need to be open to anyone who needs to use this solution.

For a refresher on building a URL, see Create a Conga Composer Button URL

Since the console is typically viewed from Cases, this button references the Cases object (&Id={!Case.Id}) but this can be placed on any object. The important thing to note is the first line: /apex/CM8ConsoleLauncher. This must match the Name of your Visualforce page. Also, the same issues that normally effect buttons apply here: no spaces, each parameter must start with an ampersand (&), etc.

/apex/CM8ConsoleLauncher 
?sessionId={!$Api.Session_ID}
&serverURL={!$Api.Partner_Server_URL_290}
&Id={!Case.Id}
&ReportId=[TestReportData]00Oi0000005isr8?pv0=
&TemplateId=a04i000000aldZX
&CETId=a02i000000FMA8L
&EmailToId={!Case.ContactId}
&esVisible=1
&esContactId={!Case.ContactId}
&esSignatureType=2
&DS7=4
		

This button could be created with Solution Manager, but modifying the button code to point to the Visualforce page would break the connection to the Solution Manager record.

  1. Create a Visualforce page.
    1. In Salesforce, click Setup > Develop > Visualforce Pages
    2. Click New
    3. In the Label field, enter CM8 Console Launcher.
    4. In the Name field, enter CM8ConsoleLauncher (no spaces).
    5. In the Visualforce Markup area, enter the following:
      <apex:page showHeader="false" standardStyleSheets="false">
          
           <script src="//ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script>
          
           <script>
                $(document).ready(function(){
                  
                     var CongaURL = 'https://composer.congamerge.com?'
                  
                     var hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&');
         
                     $.each( hashes, function( key, value ) {
                          CongaURL += value + '&';
                     });
                  
                     var CMWindow = window.open(CongaURL, "_blank", "width=700, height=550, menubar=0, scrollbars=yes, resizable=yes" );
                  
                     /*
                     * The below closes the original popup
                     *   if you leave it commented out, it becomes the parent window that is redirected by the Output mode selected in CM
                     */            
                     //var closeFirstWindow = window.open('','_self').close();            
              
                });        
           </script> 
      
      </apex:page>
      		
    6. Click Save
  2. Create a button that calls the Visualforce page.
  • Was this article helpful?