首页 > 解决方案 > 自定义选项卡未通过 API 调用在模板上发布

问题描述

我正在为 NodeJS 使用 Docusign SDK,下面是我从 nodejs github 示例中遵循的示例代码。

 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;

我有自定义文本字段,标签标签为taxYear,但在发送信封时我没有看到它在表单中发布。

开发者控制台中的模板

这是我收到的输出 输出包络

不知道我错过了什么!!!!!!

标签: docusignapidocusigncompositetmplts

解决方案


您正在使用的 Taxfield 似乎没有附加 X/Y 位置或锚字符串 - 因此我们的系统不知道将其放置在哪里。

要添加这些字段,您需要提供documentId(如果使用 x/y 坐标)recipientId、、、tabLabel以及 x/y 位置或锚字符串来放置它。

如果添加这些似乎不起作用,请使用专门针对 taxYear 选项卡的参数编辑您的评论,我们可以再看看它。


推荐阅读