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

Salesforce sending adobe sign agreements from apex.

New Here ,
Jun 23, 2020 Jun 23, 2020

Copy link to clipboard

Copied

Steps followed:

1. Installed adobe sign app(from app exchange) in salesforce.

2. Created adobe trial account and linked that account in salesforce.

3. Created aggrement template with contact as master object and had set the runtime variable as "myRecipient".

 

https://helpx.adobe.com/sign/using/salesforce-integration-developer-guide.html

As per the above documentation I am trying to load the aggrement inorder to send the same to the dynamic receipent.

 

Documentation says :

static Id load(String templateId, String masterId, Map<String,AgreementTemplateVariable> agreementTemplateVariables)

 

templateId = Aggrement template record Id;

masterId = As per my logic I am passing the contact record ID

agreementTemplateVariables = This map am not sure how to frame.

 

I do know thatAgreementTemplateVariable works as name,value pair.

myRecipient = xxx@gmail.com;

 

Working code snippet:

echosign_dev1.AgreementTemplateService.load('templateID','MasterRecordID', ?????);

 

Please do let me know what I am missing.

 

Thank you inadvance !!

TOPICS
Send documents , SharePoint and Salesforce integration

Views

697

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Oct 10, 2020 Oct 10, 2020

Copy link to clipboard

Copied

Exactly. They don't provide sample code. However it is just a Map of String (Not sure what this String is supposed to be) to NameSpace.AgreementTemplateVariable('name','value'). 

 

Adobe support would charge for this Answer 😉

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Oct 10, 2020 Oct 10, 2020

Copy link to clipboard

Copied

Sample code

Map<String,echosign_dev1.AgreementTemplateVariable> agreementTemplateVariables = new Map<String,echosign_dev1.AgreementTemplateVariable>();
agreementTemplateVariables.put('estimatedRate',new echosign_dev1.AgreementTemplateVariable('estimatedRate','1000'));

 

Although the Adobe Documentation does not talk about the Key (String).

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Oct 25, 2022 Oct 25, 2022

Copy link to clipboard

Copied

LATEST

Thanks Anup1549! Really helpful.


If everyone else is struggling with something similar the full code snippet for execute anonymous looks like this: 

 

try{
Map<String,echosign_dev1.AgreementTemplateVariable> agreementTemplateVariables = new Map<String,echosign_dev1.AgreementTemplateVariable>();
agreementTemplateVariables.put('myAttachment',new echosign_dev1.AgreementTemplateVariable('myAttachment','attachmentId'));

echosign_dev1.AgreementTemplateService.load('templateId','masterId', agreementTemplateVariables);
} catch (Exception e) {
system.debug(e.getMessage());
}

 

 

Just substitute: MasterId, TemplateId and AttachmentId for values from Salesforce. 

Votes

Translate

Translate

Report

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