Hi,
I am moving a folder from one place to another and am trying to inherit the category and values from the destination folder. I've grabbed the category version and have the right ID but when I make the following call, nothing happens, no error, just doesn't do anything.
//Initialize any LAPI Objects
LAPI_DOCUMENTS doc = new LAPI_DOCUMENTS(session);
LAPI_ATTRIBUTES attr = new LAPI_ATTRIBUTES(session);
LLValue docID = (new LLValue()).setAssocNotSet();
LLValue children = (new LLValue()).setList();
String nickName = "";
//get root folder category
//Get the object ID for the root folder
LLValue rootObjID = (new LLValue()).setAssocNotSet();
rootObjID.add("ID", settings.TaxApp_Root_ID);
//First, obtain a list of the folder's categories
LLValue catIDList = (new LLValue()).setAssocNotSet();
doc.ListObjectCategoryIDs(rootObjID, catIDList);
//loop through the categories and retrieve the catID
LLValue catID = (new LLValue()).setAssocNotSet();
for (int i = 0; i < catIDList.size(); i++)
{
if ((catIDList.toValue(i).toString("DisplayName")).CompareTo
(settings.TAX_Category) == 0)
{
catID = catIDList.toValue(i);
}
}
//Get the category version for parent folder and file
LLValue catVersion = (new LLValue()).setAssocNotSet();
doc.GetObjectAttributesEx(rootObjID, catID, catVersion);
nickName = personID + "_" + applicantID;
doc.GetObjectIDByNickname(nickName, docID);
doc.MoveObject(settings.Volume_ID, docID.toInteger(), settings.Volume_ID,
settings.TaxApp_Root_ID);
doc.SetObjectAttributesEx(docID, catVersion);
I have also tried this same code and used the catVersion to instead create an object with the category as part of the createInfo. This works fine. It is only this setobject attributes call that is doing nothing.
Anyone ran into this before? (Doing this in C#)