editFolderItemRank
Retrieves item ranking for a folder record. A saveFolderItemRank operation must be used with this operation to save any changes to the rank. A SOAP error envelope is returned if the operation fails.
To unlock the record without saving changes, use cancelSaveFolderItemRank.
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. |
Return value
| Value | Type |
|---|---|
| pEntityList | CFolderItem[] |
Example
CFolder folder = ttsdk.getFolder(cookie, "/Public/test folder 1");
CFolderItem[] fItemRanks = ttsdk.editFolderItemRank(cookie, folder.recordid, folder.ispublic);
try
{
fItemRanks[0].rank = 10;
// The following line throws an exception if the operation fails.
ttsdk.saveFolderItemRank(cookie, folder.recordid, folder.ispublic, fItemRanks);
}
catch (Exception e)
{
// The following call unlocks the record.
ttsdk.cancelSaveFolderItemRank(cookie, folder.recordid);
}