Skip to main content

Generating pdf Using Conga Composer

Conga Composer lets you to create documents from a button or link placed on a Salesforce.com page layout. It merges Salesforce.com data with Word, Excel, PowerPoint, email, or PDF templates to create finished documents.

Benefit Of Conga Composer

  • Easily create and deliver customized documents, 
  • Presentations and reports using Word, PowerPoint, Excel, HTML email and PDF forms from standard & custom objects. 
  • Generate quotes, proposals, account plans, invoices, contracts, letters & more.
In order to use Conga Composer, we need to install two things.
  •     Conga Composer 
  •     Conga Query Manager.

If we need to use some related object's record then Conga Query Manager is necessary otherwise Conga Composer is enough.

How to Install Conga Composer


Go through this link for installation .

http://knowledge.appextremes.com/appextremes/ext/kb110-how-to-install-conga-composer

How to Install Conga Query Manager


Go through this link for installation .

http://knowledge.appextremes.com/appextremes/ext/kb611-how-to-install-conga-query-manager

We already have some sample design in our local drive which signifies how the information will be presented , If we don't have then we will make one using word or anything else.

Now we will create  Conga Template and Conga Query.



Creating Conga Template

Click New button on Conga Template to create one template
After template creation ,click on AttachFile button to attach some sample template from your local drive.






Creating Conga Query

If we have to display some related object record then we have to create conga query to pull data from salesforce, here we can define as many query as want.
There is field called SOQL Select Statement where we have to write query.
For example query will be like this 

SELECT invoiceit_s__Accounting_Code__c, invoiceit_s__Charge_Date__c, invoiceit_s__Service_End_Date__c, invoiceit_s__Service_Start_Date__c, CreatedById   FROM invoiceit_s__Invoice_Lines__c WHERE invoiceit_s__Invoice__c = '{pv0}

Here we are querying data from invoice lines that means button must be in invoice page.

There are two different approach for generating document.

  • By Clicking a Button
  • Some Automation process by using Work flow  

By Clicking a Button
  • Create a custom button on master object 
  • Choose content source as URL
  • paste this code 

https://www.appextremes.com/apps/Conga/PointMerge.aspx?SessionId={!API.Session_ID}
   &ServerUrl={!API.Partner_Server_URL_80}
   &Id={!Credit_Note__c.Id} //object id where button is present
   &DefaultPDF=1
   &PartnerCode=0015000000Yd8nM // optionals 
  &EmailReplyToId{!User.Id}
  &EmailToId={!Credit_Note__c.Billing_ContactId__c}//to whom emil is going
  &EmailRelatedToId={!Credit_Note__c.Id}//object id where button is present
  &TemplateId=a0mb0000000KYO0 // conga templae id which you have created
  &QueryID=[CreditLines]a0nb0000000zgUE //conga query id, you can give many query id by using comma

How to use Conga Composer 

Go through this pdf 

Automation Process
  • Create one formula field and one checkbox field on mater object.
  • When that check box is true then workflow will be fired.
  • Create a email template through which email will be going to the customer.
  • In the formula field paste this code 

 "&Id="+Id 
   +"&TemplateId=a0pW000000335Xt" //conga template id
   +"&EmailTemplateId=00XW0000000M8Hp" //the emailtemplate id which you have created
   +"&QMode=3" 
   +"&DefaultPDF=1" 
   + "&EmailToId=" + invoiceit_s__Billing_Contact__c 
   +"&QueryID=a11W0000000ov1y,a11W0000000ov1t" //conga query id
   +"&EmailRelatedToId="+Id

  • Create work flow and an outbound message.
  • Give End point Url as https://workflow.appextremes.com/apps/Conga/PMWorkflow.aspx.
  • Select that formula field Account fields to send to selected fields.
  • Click on Save
Now work flow and outbound message is ready, when that checkbox will be ready a mail with attachment will reach to the contact's email.
For more information about salesforce conga work flow , please go through this pdf


Comments

Anonymous said…
Hi,

I implement the same as your the Endpoint URL is executed successfully but, I'm not able to receive the email.

End point :
1) https://workflow.appextremes.com/apps/Conga/PMWorkflow.aspx
2) https://workflow.congamerge.com/OBMListener.ashx

Parameters :
"&Id="+Id
+"&TemplateId=a0g4F000000cRcF"
+"&EmailTemplateId=00X4F000000MIJa"
+"&QMode=3"
+"&DefaultPDF=1"
+ "&EmailToId="+Email__c
+"&QueryID=a0Y4F00000431nS"
+"&EmailRelatedToId="+Id

Please assist me

Thanks
saivenkat said…
Everyone wants to get unique place in the IT industry’s for that you need to upgrade your skills, your blog helps me improvise my skill set to get good career, keep sharing your thoughts with us.
Best quoting software

Popular posts from this blog

How to Create a Tooltip in Lightning Datatable ?

Imagine you have a datatable displaying a list of Contact records , and one of the columns shows the Account Name . The Account Name is a hyperlink that allows users to navigate to the Account record page. But what if users want to take a quick glance at some key Account fields —like Phone or Address—without navigating to the Account record? In Salesforce Classic, this was achieved using the Mini Page Layout feature from standard page. However, in Lightning Experience, we can implement a similar feature by adding a tooltip to the data table. Solution Overview: We’ll create a Lightning Web Component (LWC) that: Displays a data table with a clickable Account Name . Provides a tooltip that shows the Account's Phone and Address fields when users hover over the Account Name. Implementation Steps: 1. Data Preparation We need to retrieve the following fields for each Contact and its associated Account: Contact Fields : Name, Phone, Email Account Fields : Name, Phone, Billing Addre...

📆 How to Get the Start and End Date of the Previous Quarter in Apex ?

 When working with Salesforce data, it's often necessary to filter or report on records from a specific quarter . If you're looking to retrieve the start and end dates of the previous quarter based on the current date, here’s a simple and reusable Apex utility you can use. 🔧 Apex Utility Methods Below are two helper methods: getStartDate() — Calculates the start date of the previous quarter . getEndDate() — Calculates the end date of the previous quarter , based on the start date. // Helper method to get the start date of the previous quarter private Date getStartDate () {     Date today = Date . today ();     Integer currentYear = today . year ();     Integer currentMonth = today . month ();     // Determine the first month of the previous quarter     Integer previousQuarterStartMonth = (( currentMonth - 1 ) / 3 ) * 3 + 1 - 3 ;     // Adjust the year if the previous quarter falls in the previ...

Add/Remove Functionality in a VF page for Creating Multiple Records For a Particular Object.

Hi Guys This is a very simple post. I had come across a scenario where I was asked to develop some functionality where user can create list of records at a time(clicking on save button on one time) and can remove row. Here I have created a pageblock table and there I am displaying 5 rows to enter data and there column, Name , Phone and Action. In Action column Delete link is present.When that link(Delete) is clicked then particular row will be removed. Two button is there Add Row and Save. Add Row-->  When that button is clicked one more row will be created in the pagablock table Save--> It will save the record. Here is the page <apex:page controller="creatingListOfRecordsController">     <apex:form >              <apex:pageBlock title="Creating List Of Account Records">         <apex:pageMessages></apex:pageMessages>             ...