To manually convert a button into a formula field

  1. 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.”
  2. 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}
    CODE
  3. Remove the following unnecessary lines:

    /apex/csfb__Conga_Composer?SolMgr=1&serverUrl={!API.Partner_Server_URL_370}&userName={!$User.Username} 
    CODE


    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}
    CODE
  4. Convert the remaining lines into a valid Salesforce formula.

    The formula must adhere to the following rules:

    1. Literal text strings (a.k.a. static text) must be enclosed in quotes (" … ")
    2. Literal spaces within literal text strings must be replaced with plus signs (+)
    3. 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
    4. 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 +
    CODE
  5. Append the QMode parameter to indicate how Conga Batch should deliver the merged output files.
    Example:

     + "&QMode=Download"
    CODE
Button URLFormula
/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"