cancelSaveTask
Unlocks a Workbook task record locked by editTask. Does not need to be called if saveTask is successful. A SOAP error envelope is returned if the operation fails.
Parameters
| Parameter | Type | Description |
|---|---|---|
| cookie | long | Session cookie returned by projectLogon. |
| recordID | long | Unique task record ID. |
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 = "";
// The following line throws an exception if summary is a required field.
ttsdk.saveTask(cookie, task);
}
catch (Exception e)
{
ttsdk.cancelSaveTask(cookie, task.recordid);
}