add custom tabs without recipients to the document DocuSign

58 Views Asked by At

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
1

There are 1 best solutions below

0
MikeMej On

It's not possible to add tabs without a recipient by ApexToolkit. Since you should specify the recipient who has ownership of those tabs.