1

我有一个 visualforce 页面 renderAs pdf,它使用 DocuSign SOAP API 发送。我需要通过 DocuSign SOAP API 在 pdf 上添加一个 testArea 字段和选择列表。

我在此链接上发现选项卡参数具有文本选项卡字段和列表选项卡字段。

单击此处查看选项卡参数

我如何在代码中编写这两个字段。我的假设应该是这样的。

DocuSignAPI.Tab tab1 = new DocuSignAPI.Tab();
    tab1.Type_x = 'Text';
    tab1.RecipientID = 1;
    tab1.DocumentID = 1;
    tab1.AnchorTabItem = new DocuSignAPI.AnchorTab();
    tab1.AnchorTabItem.AnchorTabString = 'bio:';

    envelope.Tabs = new DocuSignAPI.ArrayOfTab();
    envelope.Tabs.Tab = new DocuSignAPI.Tab[1];
    envelope.Tabs.Tab[0] = tab1;  

当我发送它时,我收到此错误

异常 - System.CalloutException:Web 服务调用失败:WebService 返回 SOAP 错误:服务器无法读取请求。---> XML 文档中有错误。---> 实例验证错误:“文本”不是 TabTypeCode 的有效值。故障代码=soap:客户端故障=

4

2 回答 2

1

要扩展 Amit 的答案:如果使用 DocuSign SOAP Apex SDK,我相信您会希望在文本选项卡中使用类似以下内容的内容:

tab1.Type = "Custom"
tab1.CustomTabType = "Text"

选择列表将是:

tab2.Type = "Custom"
tab2.CustomTabType = "List"
tab2.Name = "Red;Green;Blue"

因为列表使用分号分隔的名称值来填充选项。

于 2018-05-18T20:26:03.253 回答
1

因为TextTabtype必须是CustomCustomTabType应该是Text。要添加 TextTab 和 Dropdown,XML 将如下所示:

<ns:Tab>
    <ns:DocumentID>32093411</ns:DocumentID>
    <ns:RecipientID>45399085</ns:RecipientID>
    <ns:PageNumber>1</ns:PageNumber>
    <ns:XPosition>124</ns:XPosition>
    <ns:YPosition>261</ns:YPosition>
    <ns:Type>Custom</ns:Type>
    <ns:TabLabel>Text b5a8927a-4f93-4288-b280-d15023b1b834</ns:TabLabel>
    <ns:CustomTabType>Text</ns:CustomTabType>
</ns:Tab>
<ns:Tab>
    <ns:DocumentID>32093411</ns:DocumentID>
    <ns:RecipientID>45399085</ns:RecipientID>
    <ns:PageNumber>1</ns:PageNumber>
    <ns:XPosition>349</ns:XPosition>
    <ns:YPosition>261</ns:YPosition>
    <ns:Type>Custom</ns:Type>
    <ns:Name>Red;Blue</ns:Name>
    <ns:TabLabel>Dropdown e7f5ad78-9e10-4339-b342-023a729549b7</ns:TabLabel>
    <ns:CustomTabType>List</ns:CustomTabType>
    <ns:CustomTabListItems>Red;Blue</ns:CustomTabListItems>
    <ns:CustomTabListValues>Red;Blue</ns:CustomTabListValues>
</ns:Tab>
于 2018-05-18T18:18:45.243 回答