addEntityToFolderByRecordID
Adds an existing item to a folder in the project. A SOAP error envelope is returned if the operation fails.
Parameters
| Parameter | Type | Description |
|---|---|---|
| cookie | long | Session cookie returned by projectLogon. |
| recordID | long | Unique folder record ID. |
| publicFolder | boolean | Indicates if the folder is public or private. |
| entityRecordID | long | Record ID of the item to add to the folder. |
| entityTableName | string | Table name the field belongs to. Valid values: Defect, Test Case, Test Run, Requirement, Requirement Document, Test Variant, User, Customer, Task, Test Config, Links, Folder, and Report. Use getTableList to retrieve a list of available tables. |
Return value
| Value | Type |
|---|---|
| itemRecordID | int |
Example
CFolder folder = ttsdk.getFolder(cookie, "/Public/test folder 1");
CDefect def = ttsdk.getDefect(cookie, 0, "Defect summary", false);
int entityID = ttsdk.addEntityToFolderByRecordID(cookie, folder.recordid, folder.ispublic, def.recordid, "Defect");