I'm getting the following error when I try to apply a template (created in my web account) to the document I'm trying to upload.
"DocumentId specified in the tab element does not refer to a document in this envelope. Tab refers to DocumentId 41791752 which is not present."
Any help would be greatly appreciated. Thanks.
Here's the code I have:
string xmlBody = "<envelopeDefinition xmlns=\"http://www.docusign.com/restapi\">" + "<emailSubject>DocuSign API - Signature Request"</emailSubject>" + "<status>sent</status>" + // "sent" to send immediately, "created" to save as draft in your account "<compositeTemplates>" + "<compositeTemplate>" + "<serverTemplates>" + "<serverTemplate>" + "<sequence>1</sequence>" + "<templateId>" + templateID + "</templateId>" + "</serverTemplate>" + "</serverTemplates>" + "<inlineTemplates>" + "<inlineTemplate>" + "<sequence>2</sequence>" + "<recipients>" + "<signers>" + "<signer>" + "<recipientId>1</recipientId>" + "<email>" + recipientEmail + "</email>" + "<name>" + recipientName + "</name>" + "<roleName>Signer</roleName>" + "</signer>" + "</signers>" + "</recipients>" + "</inlineTemplate>" + "</inlineTemplates>" + "<document>" + "<name>" + documentName + "</name>" + "<documentId>1</documentId>" + "</document>" + "</compositeTemplate>" + "</compositeTemplates>" + "</envelopeDefinition>";
I had the same problem as this. worked out that you need to specify the same documentId as what's in the template for that document to be overriden with the document you are providing with this envelope (assuming you are providing a document).
ReplyDeleteso you need to pass in 41791752
though Im not yet sure how to have the signer applied in place of the template's signer.
EDIT: "so you need to pass in a documentId of 41791752, instead of 1"
Delete