Skip to content Skip to main navigation Skip to footer

Send an Existing Google Document with a Custom Button

If you are not using Opero Signature with another document generating app like Opero Documents, you can create a custom link/button to redirect you to sending a eSign Document, and also to pass all the variables to pre-populate the values on the page so you don’t need to fill them in.

Go to Setup, and then to the object from which you want to invoke the Send New Document page. Create a new custom button or link. Enter any name you want for the button/link, for example “Send Document for Signature”. For display type, select Detail Page Link or Detail Page Button, and for content source, select URL.

Below, in the box where you type your URL, type:

 /apex/esign__SendNewDocument

If you want to pass it any parameters, add ? and a first parameter name followed by = and the value you’re passing for that parameter. For all other parameters, instead of ?, use &. The values can be common text or a merge field code.

Below are the parameters you can pass to the Send New Document page:

FieldDescription
Google_Doc_IDText value of the Google Doc ID or merge field code for a custom formula field that pulls the Google Doc ID out of the full Google Doc URL of the template you are using.
Send_ToRecord Id of a Salesforce Lead or Contact record.
Email_To_NameText value of full name.
Email_ToText value of email address.
Email_CCText value of email addresses separated by semicolon.
Counter_Sign_MethodText value of one of the picklist options.
Counter_Signed_ByRecord Id of the Salesforce user who countersigned the document.
Email_TemplateRecord Id of the Salesforce email template that will be used to send the eSign Doc to the signer.
Email_SubjectText value of the subject of the email.
Witness_RequiredTrue or False.
Signer_2_RequiredTrue or False.
Signer_2_NameText value of the second signer’s full name.
Signer_2_EmailText value of the second signer’s email.
Signer_2_Email_TemplateRecord Id of the email template used to email the eSign Doc to the second signer
Disable_Comment_ButtonTrue or False.

Note: If Email_Template and Email_Subject are used at the same time, then Email_Subject will be overridden with the subject from the Email template (if the email template has a subject).

If you want to populate other custom lookup fields you have created, use the API name of the lookup field you created and remove the “__c” at the end.

Example button code:

/apex/esign__SendNewDocument
?Google_Doc_ID=1F89OGWScKxuZmJ0FsI3XstnStjBBDJSJodrL6oa6WHo
&Send_To={!Opportunity.Primary_ContactId__c}
&Counter_Sign_Method=Counter Sign Required
&Counter_Signed_By={!Opportunity.OwnerId}
&Email_Template=00X5Y000002RbZ7
&Update_Related=true
&retURL=%2F{!Opportunity.Id}
&Opportunity={!Opportunity.Id}