Skip to main content
Nintex Community Menu Bar

ListEnvelopeDocuments - C#

  • January 11, 2022
  • 0 replies
  • 6 views

butlerj
Nintex Employee
Forum|alt.badge.img+20
 // DocumentNOW V2 ListEnvelopeDocuments example // assuming we set the namespace on the service proxy to DocNow ...  // force TLS 1.2 if .net < 4.6 ServicePointManager.SecurityProtocol = System.Net.SecurityProtocolType.Tls12;  Guid accountContextID = new Guid(<fromYourAccount>); Guid envelopeId = new Guid(<fromSubmission>); Guid authToken = new Guid(<fromSubmission>);  DocNow.EnvelopeServiceClient client = new DocNow.EnvelopeServiceClient("BasicHttpBinding_IEnvelopeService1"); DocNow.ListEnvelopeDocumentsRequest request = new DocNow.ListEnvelopeDocumentsRequest(); request.ContextIdentifier = accountContextID; request.EnvelopeId = envelopeId; request.AuthToken = authToken;  DocNow.ListEnvelopeDocumentsResult result = client.ListEnvelopeDocuments(request);   if(result.Exceptions != null) {     StringBuilder sb = new StringBuilder();     foreach (DocNow.EnvelopeException exception in result.Exceptions)     {         sb.AppendFormat("{0}{1} : {2}", Environment.NewLine, exception.Severity.ToString(), exception.Value);     }     throw new Exception($"Errors occurred calling ListEnvelopeDocuments:{sb.ToString()}"); } else {     foreach(DocNow.EnvelopeDocument document in result.Documents)     {         Console.WriteLine($"{document.DocumentId}");         Console.WriteLine($"{document.AuthToken}");         Console.WriteLine($"{document.Name}");         Console.WriteLine($"{document.OrderId}");     } }