• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers

Send agreements via Apex code without Template - Invalid or no file info is provided

New Here ,
Apr 09, 2022 Apr 09, 2022

Copy link to clipboard



Is it possible to send an agreement without using a template as our users are not satisfied with the file generated thru the template merge process. So we have the file generated externally but now want to send it and get all the status updated leveraging the Salesforce Adobe sign app.


I am able to successfully create the agreement record, attach the file(s) we need to send and also create the recipient record using below


//Inserting the Agreement
echosign_dev1__SIGN_Agreement__c agrmt = new echosign_dev1__SIGN_Agreement__c ();
agrmt.Name = 'Test Agreement Send Auto '+system.now();
agrmt.echosign_dev1__Message__c = 'test from anonymous block';
agrmt.echosign_dev1__SignatureOrder__c = 'Recipient signs, then I sign';
agrmt.echosign_dev1__SignatureType__c = 'e-Signature';
agrmt.echosign_dev1__Signature_Flow__c = 'Order Entered';
agrmt.echosign_dev1__SenderSigns__c = true;
agrmt.echosign_dev1__Recipient_Addresses__c = 'xxxxx@gmail.com,';
insert agrmt;


//Link the externally created file to the agreement
ContentDocumentLink cd = new ContentDocumentLink();
cd.LinkedEntityId = agrmt.Id;
cd.ContentDocumentId = '0692h000001qS8QAAU';
cd.visibility = 'AllUsers';
insert cd;
/*(I am able to see the file in the Agreement record,
when I navigate to it on the UI) */


//Inserting the recipients
Echosign_Dev1__SIGN_Recipients__c agrmtRec = new Echosign_Dev1__SIGN_Recipients__c();
agrmtRec.echosign_dev1__Agreement__c = agrmt.Id;
agrmtRec.echosign_dev1__Recipient_Role__c = 'Signer';
agrmtRec.echosign_dev1__Order_Number__c = 1;
agrmtRec.ECHOSIGN_DEV1__EMAIL_ADDRESS__C = 'xxxxx@gmail.com,';
agrmtRec.echosign_dev1__Recipient_Type__c = 'Email';
insert agrmtRec;


However when I try to the Send the agreement by either using the process builder method(https://helpx.adobe.com/sign/using/salesforce-process-builder.html) or calling the method "echosign_dev1.EchoSignApiService.SendDocumentResult" from Apex, I get an error "Invalid or no file info is provided."

So is this doable without using a template and am I missing fields(or records) to achieve this ?



Adobe Sign forms , Send documents , SharePoint and Salesforce integration






Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
no replies

Have something to add?

Join the conversation