Copy link to clipboard
Copied
Sample Code -
//Inserting the Agreement
echosign_dev1__SIGN_Agreement__c a = new echosign_dev1__SIGN_Agreement__c ();
a.Name = 'Test agreement 6'+system.now();
a.echosign_dev1__Message__c = 'ABCD';
a.echosign_dev1__Recipient__c = '0030o00003ZwbtnAAB';
a.echosign_dev1__SignatureOrder__c = 'Recipient signs, then I sign';
a.echosign_dev1__SignatureType__c = 'e-Signature';
a.echosign_dev1__Signature_Flow__c = 'Order Entered';
a.echosign_dev1__SenderSigns__c = true;
a.echosign_dev1__Recipient_Addresses__c = 'xxxxxxxxxxxxxxxxx@gmail.com,';
insert a;
/*Taking file from an Agreement which sent the e-mail successfully to recipients, and creating a new content document link to the agreement (I am able to see the file in the Agreement record, when I navigate to it on the UI) */
ContentDocumentLink cd = new ContentDocumentLink();
cd.LinkedEntityId = a.Id;
cd.ContentDocumentId = '0690o00000ObZAcAAN';
cd.visibility = 'AllUsers';
insert cd;
//Inserting the recipients
Echosign_Dev1__SIGN_Recipients__c asdasd = new Echosign_Dev1__SIGN_Recipients__c();
asdasd.echosign_dev1__Agreement__c = a.Id;
asdasd.echosign_dev1__Contact__c = '0030o00003ZwbtnAAB';
asdasd.echosign_dev1__Recipient_Role__c = 'Signer';
asdasd.echosign_dev1__Recipient_Type__c = 'Contact';
asdasd.echosign_dev1__Order_Number__c = 1;
insert asdasd;
//And as a last step I am calling the "echosign_dev1.EchoSignApiService.SendDocumentResult" method and passing the agreement Id as the parameter.
But I am getting the error -
But I am getting the error - 'Invalid or no file info is provided.' on the field - echosign_dev1__ErrorMessage__c on Agreement object.
Can you please help with the same/or let me know if I'm missing something?
you want to make use of the agreement template service to create agreements using the agreement template record.
See
https://helpx.adobe.com/sign/using/salesforce-integration-developer-guide.html
and for a primer on using the template rcord see
Copy link to clipboard
Copied
you want to make use of the agreement template service to create agreements using the agreement template record.
See
https://helpx.adobe.com/sign/using/salesforce-integration-developer-guide.html
and for a primer on using the template rcord see
Copy link to clipboard
Copied
Hello, did you manage to get your code working? I'm having the same issue and my code is very similiar to yours.
Copy link to clipboard
Copied
Like mentioned in the previous comment. Started using agreement templates. Let me know if you need more insights to what I've tried to implement.
Copy link to clipboard
Copied
Hi, thanks for your message.
Yes, I'd like help using templates. I just need to automatically send a PDF linked to an opportunity to sign. Why do I need a template?
Copy link to clipboard
Copied
Hi,
I am in the same situation and do not want to use the template as the document generated using templates is not to our users liking..
So we have the document created but I am getting the above error when calling the "echosign_dev1.EchoSignApiService.SendDocumentResult" method.
Was anyone able to send it calling the method ?
Copy link to clipboard
Copied
Could you please elaborate on how did you achieve the same results by using Agreement Templates?
I am trying to achieve something similar where i am creating an agreement, attaching a file and then trying to send the agreement using background action but i receieve the same error as you have specified above.
Copy link to clipboard
Copied
Hi,
Did anybody find a proper solution to this. I am getting the same issue when I try to attach the file to the template programatically. When I attach the file via the UI it works so it makes me believe this is not a problem with the templates but the ContentDocument/ContentDocumentLink
Copy link to clipboard
Copied
We went the template way using a flow..
1. Create a Agreement Template record with name, message, auto send and auto reminder fields set.
2. Create the Add File Attachment record(s) with the Attachment Document Id's (ContentVersion Id), Attachment Documents(Name), Index, Attachment Source Type, Attachment Type and Agreement Template(Id from step 1).
3. Create the Add Recipient record(s) with Index, Recipient Role, Recipient Type, Signer Verification, source of Recipient, Email(or Contact/Lead Id) and Agreement Template(Id from step 1).
4. Call the Apex Action "Load Agreement Template" and pass the Agreement Template(Id from step 1).
Let me know if there are any questions with the above.
Copy link to clipboard
Copied
I was able to get it working!
Copy link to clipboard
Copied
@defaultlzg6iw5x34n7 can you please lay down the steps how did u managed to make it work. I am using
Copy link to clipboard
Copied
Hi Abhi337095073ozj,
Thank you for reaching out.
We have checked that you are using the Adobe Sign Enterprise plan. If you have an integration-related question, the experts can best answer it. Please contact our Adobe Sign Enterprise support team for the correct information. You may contact them using the steps in the following help document: https://helpx.adobe.com/sign/using/adobesign-support-resources.html.
Refer to the following help document for more information on Acrobat Sign Integration: https://helpx.adobe.com/sign/integrations/home.html.
Thanks,
Meenakshi
Copy link to clipboard
Copied
Your code seems to be missing a crucial step: telling Adobe eSign what document to send with the agreement. The error message "Invalid or no file info is provided" indicates this.
Here's the likely culprit:
Solution:
Explore Salesforce Apex methods for attaching files to records (e.g., Attachment API). Attach the document to the agreement record before attempting to send it with Adobe eSign.
Here's how you can potentially modify your code to address these issues:
//Inserting the Agreement
echosign_dev1__SIGN_Agreement__c a = new echosign_dev1__SIGN_Agreement__c ();
a.Name = 'Test agreement 6'+system.now();
a.echosign_dev1__Message__c = 'ABCD';
a.echosign_dev1__Recipient__c = '0030o00003ZwbtnAAB';
a.echosign_dev1__SignatureOrder__c = 'Recipient signs, then I sign';
a.echosign_dev1__SignatureType__c = 'e-Signature';
a.echosign_dev1__Signature_Flow__c = 'Order Entered';
a.echosign_dev1__SenderSigns__c = true;
a.echosign_dev1__Recipient_Addresses__c = 'xxxxxxxxxxxxxxxxx@gmail.com,';
insert a;
// Link the Agreement to the ContentDocument (assuming you have a method to get the correct ID)
ContentDocumentLink cd = linkAgreementToDocument(a.Id);
if (cd == null || cd.Id == null) {
// Handle error - ContentDocumentLink failed
System.debug('Error linking ContentDocument to Agreement: ');
return; // Or throw an exception
}
// Now that the link is established, proceed with recipient insertion etc.
/*Taking file from an Agreement which sent the e-mail successfully to recipients, and creating a new content document link to the agreement (I am able to see the file in the Agreement record, when I navigate to it on the UI) */
// (Rest of your code remains the same)