Assistance Required for Sending Adobe Sign Document via Apex & Flow
- March 14, 2025
- 1 reply
- 370 views
I am trying to send an Adobe Sign document through automation in Salesforce using both Apex and Flow. However, I am encountering different errors with each approach. I need clarification on:
- The correct method and parameters to use in Apex for sending an Adobe Sign document.
- Why the Flow approach is failing with a different error and how to resolve it.
Could you provide proper documentation, code snippets, or guidance on how to achieve this correctly?
Error: null : 400 : {"code":"INVALID_RECIPIENT_AUTH_METHOD","message":"Invalid authentication method for recipient "}
try {
// Initialize map for AgreementTemplateVariables
Map<String, echosign_dev1.AgreementTemplateVariable> agreementTemplateVariables = new Map<String, echosign_dev1.AgreementTemplateVariable>();
// Define recipient email and variable value
String recipientEmail = 'smitha.vikram@hrblock.com';
String variableValue = 'Test Value'; // Replace with actual required value
// Add the variable to the map (similar to 'myAttachment' example)
agreementTemplateVariables.put('recipientEmail', new echosign_dev1.AgreementTemplateVariable('recipientEmail', recipientEmail));
// Call the correct service method
echosign_dev1.AgreementTemplateService.load(
'a3QVB000000B9b32AC', // Template ID
'003VB00000OKtSvYAL', // Master ID
agreementTemplateVariables
);
} catch (Exception e) {
System.debug(e.getMessage());
}
