We are using docusign apex toolkit. is there a way to add custom tabs without recipients to the document?
we want to add all merge field to the envelope and be able to review them before we add the recipients.
right now, we create custom tab. Then, we create recipients and add custom tabs to the recipients to the envelope.
dfsle.TextTab tab5 = new dfsle.TextTab();
tab5.withDataLabel('Test');
tab5.withValue(UserInfo.getName());
tabList.add(tab5);
List<dfsle.Recipient> recipientList= new List<dfsle.Recipient>();
if(templateRecipientsJson != null){
List<RecipientObject> templateRecipients = (List<RecipientObject>)JSON.deserialize(templateRecipientsJson, List<RecipientObject>.class);
if(templateRecipients != null && templateRecipients.size() > 0){
for(RecipientObject obj :templateRecipients){
dfsle.Recipient rec = dfsle.Recipient.fromSource(
obj.name,
obj.email,
null,
obj.role,
null).withTabs(tabList);
recipientList.add(rec);
}
}
}
myEnvelope = myEnvelope.withRecipients(recipientList);
envelope = dfsle.EnvelopeService.sendEnvelope(
envelope, // The envelope to send
false); // Send now