Skip to main content
Nintex Community Menu Bar

CreateEnvelope - C#

  • January 11, 2022
  • 0 replies
  • 18 views
  • Translate

butlerj
Nintex Employee
Forum|alt.badge.img+20
// DocumentNOW V2 CreateEnvelope example  // force TLS 1.2 if .net < 4.6 ServicePointManager.SecurityProtocol = System.Net.SecurityProtocolType.Tls12; 	 Guid accountContextID = new Guid(<fromYourAccount>); Guid envelopeTemplateId = new Guid(<fromYourAccount>);  // assuming we set the namespace on the service proxy to DocNow ... DocNow.EnvelopeServiceClient client = new DocNow.EnvelopeServiceClient("BasicHttpBinding_IEnvelopeService1"); DocNow.CreateEnvelopeRequest request = new DocNow.CreateEnvelopeRequest();  request.ContextIdentifier = accountContextID; request.EnvelopeTemplateId = envelopeTemplateId; request.EnvelopeName = DateTime.Now.ToString("s"); // if a signer declines, the entire envelope is declined request.DeclineBehavior = DocNow.EnvelopeDeclineBehaviorType.DeclineAll; // signers will all be able to sign immediately request.WorkflowType = DocNow.EnvelopeWorkflowType.Parallel;  DocNow.CreateEnvelopeResult result = client.CreateEnvelope(request);  if (result[0].Exceptions != null) {     StringBuilder sb = new StringBuilder();     foreach (DocNow.EnvelopeException exception in cancelresults[0].Exceptions)     {         sb.AppendFormat("{0} : {1}{2}", exception.Severity.ToString(), exception.Value, Environment.NewLine);     }     Console.WriteLine(sb.ToString()); } else {     // we will need these for submissions of documents, and other envelope operations     Console.WriteLine(result.EnvelopeId);     Console.WriteLine(result.AuthToken);     Guid envelopeID = result.EnvelopeId;     Guid authToken = result.AuthToken;       // perform 1 or more document Submit or SubmitWithFile calls here, setting the envelopeID on the metadata     // such as "doc.Metadata.EnvelopeId = envelopeID;"     // then call CloseEnvelope  }
Did this topic help you find an answer to your question?

0 replies

Be the first to reply!

Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie Settings