Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Content Management (Extended ECM)
API, SDK, REST and Web Services
Cannot create discussion object in project via LAPI.
DeTeCSMAdmin_(Delete)_2274648
Hello.Does anyone knows how to create a discussion object in a project (valid parent of discussions) via LAPI?I tried the following code and got an error #101102 (container error).Any idea?The projectID is valid.I also tried the correct volumeID (that of EWS).There is no name conflict!LLValue request, node_in;request=new LLValue().setAssocNotSet();node_in=new LLValue().setAssocNotSet();objInfo=new LLValue().setAssocNotSet();node_in.add("Request",request);int retCode=0;retCode=documents.CreateObjectEx(0, projectID, LAPI_DOCUMENTS.OBJECTTYPE, LAPI_DOCUMENTS.DISCUSSIONSUBTYPE, "New unique name", node_in, objInfo);
Find more posts tagged with
Comments
Barbara__Melick__(aberadmin(expired))
Hi,I have a problem trying to create a folder within a project using the (Java) LAPI CreateObjectEx method. This results in a "Container Error" similar to the one you have experienced. Strangely, I can create a project within a project by just changing the CreateObjectEx subtype parameter from LAPI_DOCUMENTS.FOLDERSUBTYPE to LAPI_DOCUMENTS.PROJECTSUBTYPE.This seems to be a bug. Is there a patch or work-around that you have found?Reply to Loren at lpettijo@atc.army.milThanks.
Barbara__Melick__(aberadmin(expired))
The solution is found in the following undocumented LL Developer tip.==========================================================All Summary: The ListObjects function works a little differently with projects as opposed to folders. A project itself is an object and a volume, and has two entries in Dtree instead of one. Details: For example: VolumeID NodeID-------------- --------- -------Project Object -2000 2500Project Volume 2500 -2500If this were a folder you would use -2000 as the volumeID and 2500 as the objectID. With a project though documents are stored in the volume so you must use a volumeID of 2500 and a ObjectID of -2500.===========================================================This means that you must use a non-standard parentVolId & parentID to add a LL object directly below a project when calling the CreateObjectEx method. So code for the above example might look like this:int projectDataId = 2500; //Note that dataId, objectId, & //nodeId have similar meanings.int status = documents.CreateObjectEx ( projectDataId, -projectDataId, 0, LAPI_DOCUMENTS.FOLDERSUBTYPE, "A_Folder_Below_a_Project", createInfo, objectInfo );=======================================================The example above only applies to adding an object directlybelow a project in the LL workspace structure. In all other cases where CreateOjectEx is invoked, the normal values for VolumeId/ParentVolID and dataId/objectId/nodeId are required. Correct me if I'm wrong but this worked for me.Loren lpettijo@atc.army.mil