Skip to main content
Nintex Community Menu Bar

ListTemplates - C#

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

butlerj
Nintex Employee
Forum|alt.badge.img+20
 // DocumentNOW V2 ListTemplates 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>);  DocNow.ListTemplatesServiceClient client = new DocNow.ListTemplatesServiceClient(); DocNow.TemplateListQuery query = new DocNow.TemplateListQuery(); query.ContextIdentifier = accountContextID; query.UserName = "yourusername@yourdomain.com";  DocNow.TemplateListQueryResult result = client.ListTemplates(query);  if(result.Exceptions != null) {     StringBuilder sb = new StringBuilder();     foreach (DocNow.TemplateListException exception in result.Exceptions)     {         sb.AppendFormat("{0}{1} : {2}", Environment.NewLine, exception.Severity.ToString(), exception.Value);     }     throw new Exception($"Errors occurred calling ListTemplates:{sb.ToString()}"); } else {     foreach (DocNow.TemplateItem template in result.Templates)     { 	    Console.WriteLine($"{template.Name} ({template.Id}): modified {template.ModifiedDate}: accessibility {template.Accessibility} : description {template.Description}");     } }
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