editRequirementDocument

Retrieves a requirement document record for editing based on number or name. A saveRequirementDocument 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 cancelSaveRequirementDocument.

To edit a document based on record ID, use editRequirementDocumentByRecordID.

Parameters

Parameter Type Description
cookie long Session cookie returned by projectLogon.
documentNumber long Number of the document to edit. Set as 0 to search by document name.
name string Name of the document to edit. If the name matches more than one document, the operation fails. This field is ignored unless documentNumber 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
pRequirementDocument CRequirementDocument

Example

CRequirementDocument reqDoc = ttsdk.editRequirementDocument(cookie, 0, "Requirement document name", false);

 

try

{

reqDoc.name = "Requirement document name SOAP EDIT";

 

// The following line throws an exception if the operation fails.

ttsdk.saveRequirementDocument(cookie, reqDoc);

}

catch (Exception e)

{

// The following option unlocks the record.

ttsdk.cancelSaveRequirementDocument(cookie, reqDoc.recordid);

}