How to send a Document echo sign with apex code in Salesforce

I want to send the document sign echo on custom button using the apex code.

Document has been sent but the main problem is that the mail not send with the right format, according to the standard.

I don't have any link to sign the document.

Please provide me with the name of the API by which we apply it

My Code is

public class SendAgreementDocument {}

Public Sub SendPdf()

{

agmt echosign_dev1__SIGN_Agreement__c = new echosign_dev1__SIGN_Agreement__c();

agmt. Name = "Sample agreement";

agmt.echosign_dev1__Recipient__c = "003O000000YcB0Q"; / / Contact field

agmt.echosign_dev1__Contract__c = "800O00000002sVx"; / / ContractID.

agmt.echosign_dev1__Merge_Mapping__c = "a0qO0000006npqT"; Echo sign merge Mapping

agmt.echosign_dev1__Process_Template__c = "a0kO0000003SdP2"; / / Echo sign Data Mapping

agmt.echosign_dev1__RemindRecipient__c = "All the days, until this that signed";

agmt.echosign_dev1__SenderSigns__c = true;

agmt.echosign_dev1__Message__c = "Please sign the attached insertion order;

agmt.echosign_dev1__SignatureType__c = 'Electronic Signature';

agmt.echosign_dev1__PasswordProtectSign__c = false;

agmt.echosign_dev1__SenderSigns__c = true;

agmt.echosign_dev1__PasswordProtectPDF__c = false;

agmt.echosign_dev1__SignatureOrder__c = ' signs of the recipient, and then I'll sign. "

agmt.echosign_dev1__Status__c = "project";

Insert the agmt;

System.Debug (agmt);

Annex a1 = [select ID, parentId, name, body, ContentType in attachment where Id = "00PO0000002LCId"];

Attachment a = a1.clone ();

a.parentId = agmt.id;

Insert a;

Messaging.EmailFileAttachment attach = new Messaging.EmailFileAttachment ();

attach.setContentType (a.contentType);

attach.setFileName (B.SID);

attach.setInline (false);

Fix. Body = a.Body;

Mail Messaging.SingleEmailMessage = new Messaging.SingleEmailMessage ();

mail.setUseSignature (false);

mail.setToAddresses (new String [] {'[email protected]""});

mail.setSubject ('your presentation');

mail.setHtmlBody ("Dear customer, < br > < br > please find your declaration attached in the email.'");

mail.setFileAttachments (new Messaging.EmailFileAttachment [] {a});

mail.setFileAttachments (new Messaging.EmailFileAttachment [] {attach});

Send the email

Messaging.sendEmail (new Messaging.SingleEmailMessage [] {mail});

}

}

Hello

If you want to use the EchoSign API directly to send, then you will need to call the sendDocumentInteractive API, developing the SOAP request. Here's the documentation - https://corporate.echosign.com/public/docs/EchoSignDocumentService19?#sendDocumentInteract ive

But it is easier to use the wrapper that we provide to join the contract, make sure that you have our application installed, the latest news from the AppExchange v15, then from your apex code invoke the global echosign_dev1. Method of sendDocument of the class EchoSignApiService, passing the Id of the record of the agreement that you have created.

Thank you

Tags: Adobe Sign

Similar Questions

  • When I send a Document to sign, and when it is signed, two emails go directly to my trash. Why do they not appear in my Inbox?

    When I send a document to sign, the confirmation e-mail arrives in my trash can rather than my Inbox.  Even when the document is signed and sent back to me, the email goes directly to my trash and not Inbox.  Why and how I fix this?

    Hello Albert,.

    It seems to be a problem with your mailbox you use. I would recommend safelist "[email protected]" and then they would come directly to your Inbox. If the problem persists, I recommend contacting your in-house IT.

    Kind regards

    -Usman

  • How to send a document archived in my library to use

    How to send a document archived in my library to use.

    Hello Tina,

    You want to use the document archived as a library template in your account E-Sign? If this is the case, then from now on, it is not possible. You must create the model directly uploading from your computer system.

    Kind regards

    -Usman

  • How to send a document by my email?

    How to send a document by my email?

    You attach it like any other file...

    Friday, August 1, 2014 at 23:00, troyboy538, [email protected]>

  • How to re - send a document to sign

    I sent a document must be signed by the portal of the Echo-Sign and the signatory accidentally deleted the invitation of their e-mail before it could sign.  How can I send it again so that she can e-sign it.

    Hello

    You can use the Alternative signature method. Details attached.

    Thank you

    Jat

  • HP Officejet 4630 e-all-in-one: how to send a fax 2 sides with HP Officejet 4630 e-all-in-one series?

    There is no documentation on how to send a fax with HP Officejet 4630 e-all-in-one-sided.

    I have 20 pages with a print on both sides. How do fax you these pages so that they receive the same pages with print on both pages? I load the documents with top paper feeder. The scanner allows you to load pages ask two face contrast to send the fax?

    Thank you, Kevin

    You're welcome cybercook.

    If you need keep the same order, put a single page at a time, recharge it with the other side facing upward and click Start a new search.

    You can also place all the stocks and click Scan Page, once recharge on the other side and click again on the analysis Page.

    Once the page was scanned send the fax.

    Shlomi

  • How to send a document in WordPad

    Brand new computer and I'm "technically challenged". Seized of a three page in WordPad document (I've never heard of) thinking that I could send as an attachment, but cannot.  Is - it somehow possible or there at - it a program I don't have will allow me to do? Thank you.

    OK, so what email you service use?

    How to attach a document:

    Google Mail... http://support.Google.com/mail/bin/answer.py?hl=en&answer=6584

    Hotmail... http://www.ehow.com/how_8765266_attach-document-Hotmail.html

    Yahoo Mail... http://answers.Yahoo.com/question/index?QID=20091220101529AAcABsY

    If you use a service other than the three listed e-mail, type the name of the e-mail service in your search box of the browser and follow up with "how to reach a document."

    If your line will look like this:

    How to attach a document by mail

  • How to send a document in net. HTTP.request as a POST variable?

    I have read and reread the doc on the net. HTTP.request and he says I can pass an argument to oRequest, but I failed to pass in the current document, which is what I want to do.

    I tried app.activeDocs [0], or the encoding of a string, but if he makes the call with no error, nothing is sent.

    ORequest must be a single document, or a variable consisting of name-value pairs? How to send multiple parameters to a POSITION otherwise?

    I did very well with the call using GET, but when I tried to send the document as a GET variable, I did nothing either.

    I send to an end point of LiveCycle REST so either POST or GET is fine.

    Thank you!

    Validating the document current is simple * provided * your script runs outside the context of the document (i.e. in the console or a script to the folder level). There is no access to scripts of doc-level for obvious reasons.

    For example, put this in the console JS OCCURS the current file to a URL:

    Net.HTTP.request ({}

    cVerb: 'POST',

    cURL: "http://localhost/submit.php."

    oRequest: Collab.documentToStream (this);

    oHandler: {}

    answer: function (msg, uri, err) {}

    If (err! = undefined) app.alert (msg);

    }

    }

    });

    Your problem talking to a vanilla Web service, is that you can send the RFC1867 delimiters (i.e. the form apply for "multipart/form-data") that the ReadStream object is not a method of concatenation in the JSAPI Acrobat. It's also how you would usually precede other fields in the form, but if you are careful with your codes side server that you can send to save them as GET parameters in cURL. Normally, you'd be polite and passed a context of Type in the table of aHeaders header - it won't matter for the transmission process, but will allow your webservice predict what that heck he was sent.

    Your webservice will then read the raw data. PHP for example, you will get nothing in the $_FILES global, but you can grab the PDF by reading all of the input buffer, with the line:

    $pdf = file_get_contents() ("php://input");

    If this line was in the server script which was the JS code above, the variable $pdf will contain an exact binary copy of the currently opened document.

  • How to send photos by e-mail with a hotmail address? Pacasso don't let me do...

    How to send pictures with my emails?

    How to send pictures with my emails?

    ==============================================
    You can try to open a new e-mail message and attach the photos.

    In Picasa when you left click on the email button... What choices to make
    you see for sending electronic mail?

    You need an e-mail client installed on your system... Windows Live
    Mail, for example.

    See the following links:

    How to access Windows Live Hotmail in Windows Live Mail
    http://email.about.com/od/livemaildesktoptips/Qt/et_get_hotmail.htm

    How to make Windows Live Hotmail, your default e-mail program
    http://email.about.com/od/windowslivehotmailtips/Qt/How_to_Make_Windows_Live_Hotmail_Your_Default_Email_Program.htm

    Set up your Hotmail e-mail account in Windows Live Mail
    http://www.freeemailtutorials.com/windowsLiveMail/setupEmailAccounts/setupHotmailAccount.htm

  • How to send the picture of u with labview

    Hello

    How to send table unsigned 32-bit via UDP.

    How to convert the 32-bit unsigned byte array table.


  • How to scan a document to word with HPOfficejet 6480 I change TXT

    I use a HP Officejet 6480 and analyze in a document in word, so I can add and change the text. When I check the help button it tells me to save in a TXT file. When I go to start this process it doesn't give me that option. How should I proceed with this process to accomplish what I need to do.

    Thank you JD

    Please specify JD,

    Make sure that the HP Solution Center is narrow.

    Launch the installation of the HP software, then select install additional software.

    In the list, make sure you select the playback Iris OCR software and complete the installation.

    Now you should see options to scan a Document TXT and RTF.

    IF you no longer have the installation of the HP software, you can download it below:

    http://ftp.HP.com/pub/softlib/software11/COL31995/MP-79309-1/OJJ6400_Full_13.exe

    Please let me know of any problems,

    Shlomi

  • How to send data from the Page with a form to fill out?

    How can I automatically include the page title or any text in my Web page when my client click on the Submit button in a form to fill out?

    This may seem obvious, but if you want to receive data from a form, and then place it in the form. A hidden form field with the title page and the text of your Web page will send these data on the form submission.

    best,

    Shocker

  • How to send a document

    How can I email a document in Acrobat?

    Open the e-mail > Attach document > Send email.

  • How to send an email from folio with subj and text

    Hello!

    I have send an email to folion. I know how to do hypperlink but a necessity, not just subj and address. I need a text. Can someone explain how it is should be?

    Best regards

    You can make an object have a mailto link: hyperlink which included the object variables and body.

    It would look like this:

    mailto:[email protected]?subject=Subject-text-goes-here&body=Body-text-goes-here

    Fill the variables with your own text and do not forget to replace the spaces in your text of the object and the body with dashes of figure.

  • How to send a document by mail

    Hello

    I am trying to create a document that needs to be filled in by the user and then send it to a mailbox mailbox (for further processing).

    So I created a form with some fields and a button.

    This button should do the validation of the document, and then, if it's a document valid, send it by mail to the mailbox and then close the document.

    The document must be sent to the mailbox in PDF format!

    Can someone help me to do?

    Thanks in advance,

    Kind regards

    Olivier Mahieu

    P.S.: I have already read some threads on the forum and tried to do, but without success...

    Hi Olivier,.

    Here is the form to the you: https://acrobat.com/#d=Hb8JjB * yu6HdtTvy4bFehA

    When the form is opened in Acrobat (or preview) by pressing command + J to display the Javascript Console. This showed that the full reference for PostalCode was not provided.

    Change of the switch statement to the following worked:

    switch (Page1.Table.PostalCode.rawValue)
    
    {
         ...
    

    I see you are using paper based on bar codes. These only work in Acrobat or Reader if the shape is compatible with the full server LC Reader Extensions ES product player. Reader allowing the form in Acrobat will not turn on the features of barcode.

    Good luck

    Niall

Maybe you are looking for