editDefectByRecordID
Retrieves a defect record for editing based on record ID. A saveDefect 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 cancelSaveDefect.
To edit a defect based on defect number or summary, use editDefect.
Parameters
| Parameter | Type | Description |
|---|---|---|
| cookie | long | Session cookie returned by projectLogon. |
| recordID | long | Unique defect record ID. |
| bDownloadAttachments | boolean | Indicates if attachments should be retrieved. Using False may improve performance when the file contents are not needed. |
Return value
| Value | Type |
|---|---|
| pDefect | CDefect |
Example
CDefect def = ttsdk.editDefectByRecordID(cookie, 1, false);
try
{
def.enteredby = "Administrator, System";
// The following line throws an exception if the operation fails.
ttsdk.saveDefect(cookie, def);
}
catch (Exception e)
{
// The following operation unlocks the record.
ttsdk.cancelSaveDefect(cookie, def.recordid);
}