editRequirement
Retrieves a requirement record for editing based on number or summary. A saveRequirement 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 cancelSaveRequirement.
To edit a requirement based on record ID, use editRequirementByRecordID.
Parameters
Parameter | Type | Description |
---|---|---|
cookie | long | Session cookie returned by projectLogon. |
requirementNumber | long | Number of the requirement to edit. Set as 0 to search by summary. |
summary | string | Summary of the requirement to edit. If the summary matches more than one requirement, the operation fails. This field is ignored unless requirementNumber is 0. |
bDownloadAttachments | boolean | Indicates if attachments should be retrieved. Using False may improve performance when the file contents are not needed. |
Return value
Value | Type |
---|---|
pRequirement | CRequirement |
Example
CRequirement req = ttsdk.editRequirement(cookie, 0, "Requirement summary", false);
try
{
req.summary = "Requirement summary SOAP EDIT";
// The following line throws an exception if the operation fails.
ttsdk.saveRequirement(cookie, req);
}
catch (Exception e)
{
// The following operation unlocks the record.
ttsdk.cancelSaveRequirement(cookie, req.recordid);
}