Convert a Composer Button into a Formula Field Manually for Conga Batch
To manually convert a button into a formula field
-
Create a custom formula field on your Master Object
with Return Type of Text and label it.
It is helpful to include the type of delivery method (ex: download, email, etc.), the template, and the master object in the Label such as, “Conga Batch Download Simple Proposal Oppty.”
-
Copy the button URL from your working button and paste it in your formula field’s formula window.
Example:
/apex/csfb__Conga_Composer?SolMgr=1 &serverUrl={!API.Partner_Server_URL_370} &userName={!$User.Username} &Id={!blng__Invoice__c.Id} &TemplateId=a0I80000000laT3 &FP0=1 &AC0=1 &AC1=Invoice+for+{!Opportunity.Name}
-
Remove the following unnecessary lines:
/apex/csfb__Conga_Composer?SolMgr=1&serverUrl={!API.Partner_Server_URL_370}&userName={!$User.Username}
You should be left with just the &Id parameter and what follows it. For example:
&Id={!blng__Invoice__c.Id} &TemplateId=a0I80000000laT3 &FP0=1 &AC0=1 &AC1=Invoice+for+{!Opportunity.Name}
-
Convert the remaining lines into a valid Salesforce formula.
The formula must adhere to the following rules:
- Literal text strings (a.k.a. static text) must be enclosed in quotes (" … ")
- Literal spaces within literal text strings must be replaced with plus signs (+)
- Merge fields from the button must be replaced with the corresponding field available in the formula. For example, {!Opportunity.Id} would be replaced with Id
- Each element (literal text strings and fields) must be joined with the concatenation operator (+) or (&)
Example:
"&id="+ Id +"&TemplateId=a0I80000000laT3" +"&FP0=1" +"&AC0=1" +"&AC1=Invoice+for+" + Name +
-
Append the QMode parameter to indicate how Conga Batch should deliver the merged output files.
Example:
+ "&QMode=Download"
Button URL
Formula
/apex/csfb__Conga_Composer?SolMgr=1 &serverUrl={!API.Partner_Server_URL_370} &userName={!$User.Username} &Id={!blng__Invoice__c.Id} &TemplateId=a0I80000000laT3 &FP0=1 &AC0=1 &AC1=Invoice+for+{!Opportunity.Name}
"&id=" + Id + "&TemplateId=a0I80000000laT3" + "&FP0=1" + "&AC0=1" + "&AC1=Invoice+for+" + Name + "&QMode=Download"