saveFolderItemRank

Saves changes made to item ranking in a folder record and unlocks the record. Use editFolderItemRank to start the editing process.

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

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.
folderItemList CFolderItem[] List of items in the folder. Each item in the list has its own ranking.

Return value

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

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);

}