Skip to main content
Question

Need help in SF with Docusign integration (Not showing field value on docu sign template that i prefilled in apex class using apex toolkit)

  • March 26, 2025
  • 1 reply
  • 19 views

Forum|alt.badge.img

 

Need help in SF with Docusign integration

Requirement: Want to prepopulate some custom fields value on template, i have set these custom field values in apex(using apex toolkit) class but i am not seeing these values in pdf.

 

Development approach: I have already installed DocuSign(Docusign Apps Launcher) managed package in salesforce and uploaded DocuSign template(word format) in DocuSign portal. I have set the custom field values in apex code, Receiver is receiving an email with attached doc but he is not seeing custom field values post complete it also.

 

Feel free to ask any doubts/more details.

I am using below code:

dfsle.Envelope myEnvelope = dfsle.EnvelopeService.getEmptyEnvelope(
new dfsle.Entity(mySourceId));

List<dfsle.Tab> envelopeTabs = new List<dfsle.Tab>();

//Custom fields isResidential
envelopeTabs.add(new dfsle.TextTab().withValue('ResidentialValue').withDataLabel('isResidential'));

dfsle.Recipient myRecipient = dfsle.Recipient.fromSource(
contact.Name,
contact.Email,
null,
'Developer',
null 
).withTabs(envelopeTabs);

myEnvelope = myEnvelope.withRecipients(new List<dfsle.Recipient> { myRecipient });

dfsle.UUID myTemplateId = dfsle.UUID.parse('XXXXXXXXXXX12345'); 
dfsle.Document myDocument = dfsle.Document.fromTemplate(
myTemplateId,
'TemplateName'
);

myEnvelope = myEnvelope.withDocuments(
new List<dfsle.Document> { myDocument }
);
myEnvelope = dfsle.EnvelopeService.sendEnvelope(
myEnvelope,
true

 

Thanks in advance

ssoni583@gmail.com

 

1 reply

Forum|alt.badge.img+7

I've reviewed the provided code but I don't see any issues. Please check whether the data label of the text tab in the template is "isResidential" on the template prepare page on Docusign Portal. The value ('ResidentialValue') defined in the ApexToolkit won't be mapped if the value of the label doesn't match.