• Share
    • Twitter
    • LinkedIn
    • Facebook
    • Email
  • Feedback
  • Edit
Show / Hide Table of Contents

getReplyTemplates

Some tooltip text!
• 1 minute to read
 • 1 minute to read

Description

Gets the id and name of all reply templates under a given folder. Useful for getting a list of reply templates in the system, which can be retrieved in full with the getReplyTemplate method.

In parameters

Parameter Description
sessionKey A valid session key
folderId The id of the folder to retrieve reply templates from. -1 means retrieving all reply templates

Out parameters

Parameter Description
errorCode See list of codes
replyTemplates An array of ReplyTemplateStruct. Elements are listed below
description The description of the given folder
name The name of the given folder
ReplyTemplateStruct member Description
id ID of the reply template.
description Description of the reply template
folder Folder ID the reply template is in.

Example

ticket.ticketService ticketService = new ticket.ticketService();
string sessionKey;
string errorCode = ticketService.login("egon", "norges bank", out sessionKey);

if (errorCode.Equals("0"))
{
  ticket.ReplyTemplateStruct[] replyTemplates;
  ticketService.getReplyTemplates(sessionKey, -1);

  // assume this has been populated, see example for getReplyTemplateFolders
  TreeView tree;
  foreach(ticket.ReplyTemplateStruct rt in replyTemplates)
  {
    tree.addNode(rt.id, rt.description, rt.folder);
  }
}
© SuperOffice. All rights reserved.
SuperOffice |  Community |  Release Notes |  Privacy |  Site feedback |  Search Docs |  About Docs |  Contribute |  Back to top