DocuSign Apex 工具包:动态添加收件人(接收副本)

问题描述 投票:0回答:1

我正在使用如何使用嵌入式签名指南。

我想扩展代码以添加一个新的收件人,该收件人仅在签名完成后收到副本。

我成功更新了 DocuSign 信封模板以添加收件人(用户记录、角色:抄送、操作:接收副本)。

我想根据案例数据抄送特定的电子邮件地址。

我尝试使用此代码:

new List<dfsle.Recipient> {
    dfsle.Recipient.newEmbeddedSigner(),
    dfsle.Recipient.fromSource(
        'John Smith', // Recipient name
        '[email protected]', // Recipient email
        null, //Optional phone number
        'CC', //Role Name. Specify the exact role name from template
        null)
            .withRole(dfsle.Recipient.TYPE_CARBON_COPY)
}; 

约翰·史密斯被添加为

Needs to Sign

是否可以使用 Apex Toolkit 以编程方式添加收件人作为接收副本?或者我是否需要创建多个具有不同收件人的 DocuSign 信封模板来接收副本?

salesforce docusignapi docusignapextoolkit
1个回答
0
投票

我的错误,使用了错误的API。应该使用 withType

new List<dfsle.Recipient> {
    dfsle.Recipient.newEmbeddedSigner(),
    dfsle.Recipient.fromSource(
        'John Smith', // Recipient name
        '[email protected]', // Recipient email
        null, //Optional phone number
        'CC', //Role Name. Specify the exact role name from template
        null)
            .withType(dfsle.Recipient.TYPE_CARBON_COPY)
}; 
© www.soinside.com 2019 - 2024. All rights reserved.