I am using How to use embedded signing guide.
I would like to extend the code to add a new Recipient that will only receives a copy after the signing is completed.
I successfully updated the DocuSign Envelope Template to add Recipient (User record, Role: CC, Action: Receives a Copy).
I want to cc a specific email address based on the Case data.
I tried using this code:
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)
};
John Smith was added as Needs to Sign.
Is it possible to use Apex Toolkit to programmatically add a Recipient as Receives a Copy? Or do I need to create multiple DocuSign Envelope Templates with different Recipients for Receives a Copy?
My mistake, used wrong API. Should be using withType