docusignapi - With the DocuSign API call CreateEnvelopeFromTemplates how do you match a recipient with the role in the template? -


my template has 1 role defined. i'm trying send envelope based on template , filling in name , e-mail 1 role user not have place own signature block.

the problem adds second signer envelope. second signer got email asking them sign must manually place signature because signature block defined first signer.

i started code here: https://www.docusign.com/p/apiguide/content/sending%20group/createenvelopefromtemplates.htm

here code have. java code.

            // first template             envelopetemplates templates = port.requesttemplates(accountid, false);             string templateid = templates.getenvelopetemplatedefinition().get(0).gettemplateid();             envelopetemplate template = port.requesttemplate(templateid, false);              // existing recipient template             recipient recipient = template.getenvelope().getrecipients().getrecipient().get(0);             recipient.setemail("asdf@example.com");             recipient.setusername("john doe");             arrayofrecipient1 recipients = new arrayofrecipient1();             recipients.getrecipient().add(recipient);              arrayofcustomfield arrayofcustomfield = new arrayofcustomfield();             customfield f = new customfield();             f.setname("masterrecordid");             f.setvalue("1");             f.setshow("false");             arrayofcustomfield.getcustomfield().add(f);              // define envelope info             envelopeinformation envelopeinformation = new envelopeinformation();             envelopeinformation.setsubject("test email subject");             envelopeinformation.setaccountid(accountid);             envelopeinformation.setemailblurb("test email blurb");             envelopeinformation.setcustomfields(arrayofcustomfield);              // define template             arrayoftemplatereference arrayoftemplatereference = new arrayoftemplatereference();             templatereference templatereference = new templatereference();             templatereference.settemplate(template.getenvelopetemplatedefinition().gettemplateid());             templatereference.settemplatelocation(templatelocationcode.server);             arrayoftemplatereference.gettemplatereference().add(templatereference);             envelopestatus status = port.createenvelopefromtemplates(arrayoftemplatereference, recipients, envelopeinformation, false); 

if have recipient role defined on template need reference instead of creating new 1 here in code. think 2 recipients 1 template + 1 code.

set recipient.rolename match name gave on template.


Comments

Popular posts from this blog

python - TypeError: start must be a integer -

c# - DevExpress RepositoryItemComboBox BackColor property ignored -

django - Creating multiple model instances in DRF3 -