Task operations

To access the task operations, the selected Object Type for the script must be Task. It can also be Note or Attachment if the note or attachment is a task note or attachment.

It contains the task data and additional helper methods. The task data contains only task field data; it does not contain its notes or attachments.

Type task. to access data from a specific task field or execute a helper method. The field names and helper methods appear in a type-ahead box as you type.

NOTE: When changing the state of a task field, use 'C', 'A', or 'O' instead of Closed, Active or Open, respectively. For example, use
"task.status = 'C'" 
instead of
"task.status = 'Closed'"

The helper methods are described in the following table.

Operation Description
addNote(text)

Adds a note to the task with the given text. Returns a Note script object for further customization.

getParentObject()

Returns the Incident script object that owns this task.