docusignapidocusigncompositetmplts

custom tabs are not posting on template via API call


I am using Docusign SDK for NodeJS and below is sample code that I followed from nodejs github example.

 let taxYear = docusign.Text.constructFromObject({
    customTabId:"taxYear",
    tabLabel: "taxYear",
    value:"2018"
})

let signer1Tabs = docusign.Tabs.constructFromObject({
    textTabs: [taxYear]
})

// Create a signer recipient for the signer role of the server template
let signer1 = docusign.Signer.constructFromObject({
    email: args.signerEmail,
    name: args.signerName,
    roleName: "signer",
    recipientId: "1",
    // Adding clientUserId transforms the template recipient
    // into an embedded recipient:
    clientUserId: "1",
    tabs: signer1Tabs
});

// Create the cc recipient
let cc1 = docusign.CarbonCopy.constructFromObject({
    email: args.ccEmail,
    name: args.ccName,
    roleName: "cc",
    recipientId: "2"
});

// Recipients object:
let recipientsServerTemplate = docusign.Recipients.constructFromObject({
    carbonCopies: [cc1], signers: [signer1], });

// create a composite template for the Server Template
let compTemplate1 = docusign.CompositeTemplate.constructFromObject({
    compositeTemplateId: "1",
    serverTemplates: [
        docusign.ServerTemplate.constructFromObject({
            sequence: "1",
            templateId: args.templateId
        })
    ],

    // Add the roles via an inlineTemplate
    inlineTemplates: [
        docusign.InlineTemplate.constructFromObject({
            sequence: "1",
            recipients: recipientsServerTemplate
        })
    ]
})

// create the envelope definition
let env = docusign.EnvelopeDefinition.constructFromObject({
    status: "sent",
    compositeTemplates: [compTemplate1]
})

return env;

I have custom text field with tab label as taxYear but I am not seeing it getting posted in the form when envelop is sent out.

templet in developer console

Here is the out put I am receiving output envelop

Not sure what I am missing!!!!!!


Solution

  • The Taxfield that you're using does not appear to have an X/Y location or anchor string attached to it -- so our system would not know where to place it.

    For these fields to be added, you need to supply the documentId (if using x/y coordinates), recipientId, tabLabel, and either the x/y position or an anchor string to place it.

    If adding those doesn't seem to do it, please edit your comment with the parameters specifically for the taxYear tab and we can have another look at it.