editTask
Retrieves a Workbook task record for editing based on summary. A saveTask operation must be used with this operation to save any changes to the record. A SOAP error envelope is returned if the operation fails.
To unlock the record without saving changes, use cancelSaveTask.
To edit a task based on record ID, use editTaskByRecordID.
Parameters
Parameter | Type | Description |
---|---|---|
cookie | long | Session cookie returned by projectLogon. |
summary | string | Summary of the task to edit. If the summary matches more than one task, the operation fails. |
Return value
Value | Type |
---|---|
pTask | CTask |
Example
CTask task = ttsdk.editTask(cookie, "Task summary");
try
{
task.summary = "Task summary SOAP EDIT";
// The following line throws an exception if the operation fails.
ttsdk.saveTask(cookie, task);
}
catch (Exception e)
{
// The following operation unlocks the record.
ttsdk.cancelSaveTask(cookie, task.recordid);
}