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

Accept ticket

•
Version: 10
Some tooltip text!
• 1 minute to read
 • 1 minute to read

Accepting or assigning a ticket means to update ownedBy. You might also want to update the status and the last modified timestamps.

Ticket t;
t.load(1);

if (t.getValue("ownedBy") == "1") {
  t.setValue("ownedBy", "7");
  t.setValue("ticketStatus", "1");
  String now = getCurrentDateTime().toString();
  t.setValue("lastChanged", now);
  t.setValue("dbiLastModified", now);
  t.save();
}

Bool notifyEmail(Integer replyTemplateId)

Sends a notification email to the owner of the ticket.

Call notifyEmail() when you create a new ticket, add a new message to a ticket, and similar events.

Pass the ID of a suitable reply template.

Ticket t;
t.setValue("title", "No audio");
t.setValue("ownedBy", "3");
t.save();
t.notifyEmail(8);
In This Article
© SuperOffice. All rights reserved.
SuperOffice |  Community |  Release Notes |  Privacy |  Site feedback |  Search Docs |  About Docs |  Contribute |  Back to top