向 TemplateRole 添加附加选项卡
Adding Addition Tabs to TemplateRole
我使用 DocuSign API 来预填充模板上的现有选项卡。我正在尝试为 templaterole 签名者动态添加一些额外的选项卡,但这些选项卡没有显示。
这是我正在使用的代码。
string SigningGroupID = "12345";
string RoleName = "Test Signing Group"';
string TemplateId = "XXX-XX-XXXX-XXX";
List<TemplateRole> templateRoles = new List<TemplateRole>();
DocuSign.eSign.Model.Tabs tabs = new DocuSign.eSign.Model.Tabs();
List<Text> TextTabs = new List<Text>();
Text text = new Text();
text.TabLabel = "test_label";
text.XPosition = "100";
text.YPosition = "150";
TextTabs.Add(text);
if (TextTabs.Count > 0) tabs.TextTabs = TextTabs;
TemplateRole doc_signer = new TemplateRole
{
SigningGroupId = SigningGroupID,
RoleName = RoleName,
RoutingOrder = "1",
Tabs = tabs
};
templateRoles.Add(doc_signer);
EnvelopeDefinition envelope = new EnvelopeDefinition();
envelope.EmailSubject = "This is a test";
envelope.Status = "created";
envelope.TemplateId = TemplateId;
envelope.TemplateRoles = templateRoles;
EnvelopesApi envelopeApi = new EnvelopesApi(_apiClient.Configuration);
EnvelopeSummary results = envelopeApi.CreateEnvelope(AccountID, envelope);
Console.WriteLine(results.ToJson());
我是否需要在新文本对象上填充一些额外的项目(例如 TabID)?我不确定为什么这不起作用。
谢谢
j限制
正确。您缺少 Text 对象的一些属性。定义文本选项卡时,请确保通过指定以下内容将其连接到适当的收件人、文档和页面:
- text.documentId
- text.pageNumber
- text.recipientId
- text.xPosition
- text.yPosition
- text.tabLabel
要确定三个缺失值,您可以向 GET /templates 发出请求,这将 return 给您 ID。 SDK方法为Templates:get
您可以添加更多属性,但您需要这些属性才能使您的选项卡正确显示。
我使用 DocuSign API 来预填充模板上的现有选项卡。我正在尝试为 templaterole 签名者动态添加一些额外的选项卡,但这些选项卡没有显示。
这是我正在使用的代码。
string SigningGroupID = "12345";
string RoleName = "Test Signing Group"';
string TemplateId = "XXX-XX-XXXX-XXX";
List<TemplateRole> templateRoles = new List<TemplateRole>();
DocuSign.eSign.Model.Tabs tabs = new DocuSign.eSign.Model.Tabs();
List<Text> TextTabs = new List<Text>();
Text text = new Text();
text.TabLabel = "test_label";
text.XPosition = "100";
text.YPosition = "150";
TextTabs.Add(text);
if (TextTabs.Count > 0) tabs.TextTabs = TextTabs;
TemplateRole doc_signer = new TemplateRole
{
SigningGroupId = SigningGroupID,
RoleName = RoleName,
RoutingOrder = "1",
Tabs = tabs
};
templateRoles.Add(doc_signer);
EnvelopeDefinition envelope = new EnvelopeDefinition();
envelope.EmailSubject = "This is a test";
envelope.Status = "created";
envelope.TemplateId = TemplateId;
envelope.TemplateRoles = templateRoles;
EnvelopesApi envelopeApi = new EnvelopesApi(_apiClient.Configuration);
EnvelopeSummary results = envelopeApi.CreateEnvelope(AccountID, envelope);
Console.WriteLine(results.ToJson());
我是否需要在新文本对象上填充一些额外的项目(例如 TabID)?我不确定为什么这不起作用。
谢谢 j限制
正确。您缺少 Text 对象的一些属性。定义文本选项卡时,请确保通过指定以下内容将其连接到适当的收件人、文档和页面:
- text.documentId
- text.pageNumber
- text.recipientId
- text.xPosition
- text.yPosition
- text.tabLabel
要确定三个缺失值,您可以向 GET /templates 发出请求,这将 return 给您 ID。 SDK方法为Templates:get
您可以添加更多属性,但您需要这些属性才能使您的选项卡正确显示。