Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Extended data with CreateObjectEx

Status
Not open for further replies.

cdfly

Programmer
Jun 16, 2010
68
US
Hello,
When creating a node using the CreateObjectEx method should I be able to specify the extendedData also?
I’m using the code below, the node is created successfully but the extendedData is always null

Code:
LLValue extData = new LLValue().setAssoc();
LLValue createInfo = (new LLValue()).setAssocNotSet();
objectInfo = new LLValue().setAssoc();
versionInfo = new LLValue().setAssoc();

//Add data to extended data assoc
extData .add("extendedDataTest", "test 123");

//Add extended data assoc to the creatInfo assoc
createInfo.add("extendedData", extData);
//Create the node
int res =docs.CreateObjectEx(parentVolID, folderID, docs.OBJECTTYPE,docs.DOCUMENTSUBTYPE, "test", createInfo, objectInfo);
//Create a version
int r=docs.CreateVersion(parentVolID, nodeID, document, versionInfo);
Thanks
 
check lapi documentation I dont have access to it now and see if updateobjectinfo has the command to do extendeddata.


Well, if I called the wrong number, why did you answer the phone?
James Thurber, New Yorker cartoon caption, June 5, 1937
Certified OT Developer,Livelink ECM Champion 2008,Livelink ECM Champion 2010
 
Mmmm still doesn't seem to work, probably something I'm doing wrong


LLValue extData = new LLValue().setAssoc();
LLValue createInfo = (new LLValue()).setAssocNotSet();
objectInfo = new LLValue().setAssoc();
versionInfo = new LLValue().setAssoc();

//Add data to extended data assoc
extData .add("extendedDataTest", "test 123");

//Add extended data assoc to the creatInfo assoc
createInfo.add("extendedData", extData);
//Create the node
int res =docs.CreateObjectEx(parentVolID, folderID, docs.OBJECTTYPE,docs.DOCUMENTSUBTYPE, "test", createInfo, objectInfo);
//Create a version
int r=docs.CreateVersion(parentVolID, nodeID, document, versionInfo);

//NEW code

LLValue x=createInfo.toValue("extendedData");
x.setValue(extData);
docs.UpdateObjectInfo(parentVolID, nodeID, x);
 
sorry what I meant was I do not have access to livelink or builder for another ten days or so.I was merely suggesting to look at lapi documentation and see if the updateobjectinfo call allows that field as updatable,then there is a good chance you could make it work

Well, if I called the wrong number, why did you answer the phone?
James Thurber, New Yorker cartoon caption, June 5, 1937
Certified OT Developer,Livelink ECM Champion 2008,Livelink ECM Champion 2010
 
From the documentation it looks like the CreateObjectEx is the method that takes care of the extendedData, the UpdateObjectInfo doesn't appear to

Thanks
 
well according to 9.7.1 lapi documentation it says that CreateObjectEx you cannot do any manipulation of extendeddata.The Objectinfo you see there is what livelink provides to you after the node was created for you.If you read the documentation on updateobjectinfo it says that you can update extendeddata provided that you "OBEY THE SUBTYPES" for which the call will work.If this was a custom node I would trace the oscript on one of those subtypes and write a api override for your work.

Well, if I called the wrong number, why did you answer the phone?
James Thurber, New Yorker cartoon caption, June 5, 1937
Certified OT Developer,Livelink ECM Champion 2008,Livelink ECM Champion 2010
 
It appears that our documentation is old.
These aren’t custom nodes so I will look at the updateObjectInfo again.

Thanks for all the help

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top