saveTask
Saves changes made to a Workbook task record and unlocks the record. Use editTask or editTaskByRecordID to start the editing process.
A SOAP error envelope is returned if the operation fails. If the operation fails, use cancelSaveTask to unlock the record instead.
Parameters
| Parameter | Type | Description |
|---|---|---|
| cookie | long | Session cookie returned by projectLogon. |
| pTask | CTask | Edited task to save. |
Return value
| Value | Type | Notes |
|---|---|---|
| result | int | 0 indicates success. Check the return value in case of an error. |
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);
}