0

我正在使用 Docusign apex 工具包发送要签名的文档。我想声明一个新收件人的问题(它没有存储在 salesforce DB 中)所以我尝试使用该函数

dfsle.Recipient.newRecipient

但我有这个错误

Method is not visible: dfsle.Recipient dfsle.Recipient.newRecipient(Integer, String, dfsle.Recipient.Role, String, String, dfsle.Recipient.Authentication, String, Boolean).

另外,我尝试使用该功能

dfsle.Recipient myRecipient1 = dfsle.Recipient.Recipient(id, type, sequence, routingOrder, role, name, email, signingGroup, phone, authentication, note, emailSettings, hostName, hostEmail, signNow, source, readOnly, required)` but I have got this error: `Method does not exist or incorrect signature: void Recipient(Id, String, Integer, Integer, NULL, String, String, NULL, String, NULL, String, NULL, String, String, Boolean, NULL, Boolean, Boolean) 

来自dfsle.Recipient类型。

注意到我没有使用该方法

dfsle.Recipient.fromSource

因为我想在没有存储在 salesforce 中的对象的情况下创建新的收件人。

4

1 回答 1

0

您可以直接在 apex 中使用姓名和电子邮件地址显式添加收件人:

在我们的开发者网站 https://developers.docusign.com/salesforce/code-examples/salesforce-sending-signing-template上提到的示例中

我们网站的示例 //使用 Recipient.fromSource 方法来创建 Recipient

dfsle.Recipient myRecipient = dfsle.Recipient.fromSource(
myContact.Name, // Recipient name
myContact.Email, // Recipient email
null, //Optional phone number
'Signer 1', //Role Name. Specify the exact role name from template
new dfsle.Entity(myContact.Id)); //source object for the Recipient

更新此示例以在 Salesforce 外部添加收件人

dfsle.Recipient myRecipient = dfsle.Recipient.fromSource(
Name, // External Recipient name
Email, // External Recipient email
null, //Optional phone number
'Signer 1', //Role Name. Specify the exact role name from template
null); //add source object here as null 
于 2020-08-06T19:03:37.240 回答