[英]adding TextBox Field and Picklist to pdf that send through DocuSignAPI
I have a visualforce page renderAs pdf it uses DocuSign SOAP API to be send. 我有一个visualforce页面renderAs pdf,它使用DocuSign SOAP API进行发送。 I need to add a testArea field and picklist on the pdf through DocuSign SOAP API.
我需要通过DocuSign SOAP API在pdf上添加一个testArea字段和选择列表。
I found on this link that tab parameters has Text Tab field and List Tab field. 我在此链接上发现选项卡参数具有“文本选项卡”字段和“列表选项卡”字段。
click here for Tab Parameters 单击此处以获取选项卡参数
how I can write those two fields in the code. 我如何在代码中编写这两个字段。 My assumption it should be something like this.
我认为应该是这样的。
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;
when I send it I get this error 当我发送它时,我得到这个错误
Exception - System.CalloutException: Web service callout failed: WebService returned a SOAP Fault: Server was unable to read request. 异常-System.CalloutException:Web服务标注失败:WebService返回SOAP错误:服务器无法读取请求。 ---> There is an error in the XML document.
---> XML文档中有错误。 ---> Instance validation error: 'Text' is not a valid value for TabTypeCode.
--->实例验证错误:“文本”不是TabTypeCode的有效值。 faultcode=soap:Client faultactor=
faultcode =肥皂:客户端faultactor =
For TextTab
, type
has to be Custom
and CustomTabType
should be Text
. 对于
TextTab
, type
必须为Custom
而CustomTabType
应该为Text
。 To Add TextTab and Dropdown, XML will look like below: 要添加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>
To expand on Amit's answer: If using the DocuSign SOAP Apex SDK, I believe you would want something along the lines of this for the text tab: 扩展Amit的答案:如果使用DocuSign SOAP Apex SDK,我相信您会希望在文本选项卡上使用以下内容:
tab1.Type = "Custom"
tab1.CustomTabType = "Text"
The picklist would be: 选择列表为:
tab2.Type = "Custom"
tab2.CustomTabType = "List"
tab2.Name = "Red;Green;Blue"
as lists use a semicolon separated Name value to populate options. 列表使用分号分隔的Name值填充选项。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.