saveDefect

Saves changes made to a defect record and unlocks the record. Use editDefect or editDefectByRecordID to start the editing process.

A SOAP error envelope is returned if the operation fails. If the operation fails, use cancelSaveDefect to unlock the record instead.

Parameters

Parameter Type Description
cookie long Session cookie returned by projectLogon.
pDefect CDefect Edited defect to save.

Return value

Value Type Notes
result int 0 indicates success. Check the return value in case of an error.

Example

CDefect def = ttsdk.editDefect(cookie, 0, "Defect summary", 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);

}