自定义标签未通过API调用发布在模板上

问题描述

我正在使用Docusign SDK for NodeJS,下面是从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,但是寄出信封时我看不到它在表单中发布。

templet in developer console

这是我收到的输出

output envelop

不知道我在想什么!!!!!!

解决方法

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

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

如果添加的内容似乎无效,请使用“ taxYear”标签专用的参数编辑您的评论,我们可以再进行查看。

关于, 马特