Send agreements via Apex code (Salesforce integration) - Invalid or no file info is provided
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?
