[英]adding TextBox Field and Picklist to pdf that send through DocuSignAPI
我有一個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的有效值。 faultcode =肥皂:客戶端faultactor =
對於TextTab
, type
必須為Custom
而CustomTabType
應該為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>
擴展Amit的答案:如果使用DocuSign SOAP Apex SDK,我相信您會希望在文本選項卡上使用以下內容:
tab1.Type = "Custom"
tab1.CustomTabType = "Text"
選擇列表為:
tab2.Type = "Custom"
tab2.CustomTabType = "List"
tab2.Name = "Red;Green;Blue"
列表使用分號分隔的Name值填充選項。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.