Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Content Management (Extended ECM)
API, SDK, REST and Web Services
Setting folder by id
Pfizer_Developers
So I am having problems doing something that would seem to be very simple. Basically i am trying to allow my user to navigate thier folder tree, and publish documents to it via LAPI, but I can't figure out how to let them do it.I can access thier personal workspace just fine: public void accessPersonalWorkspace() throws Exception { // Access the user's Personal Workspace this.status = documents.AccessPersonalWS( pwsInfo ); if ( this.status == 0 ) { parentVol = pwsInfo.toInteger( "VolumeID" ); parentID = pwsInfo.toInteger( "ID" ); int createdby = pwsInfo.toInteger("CreatedBy"); String name = pwsInfo.toString("Name"); debug ( "Accessed Personal Workspace:"+name ); } else handelError(); }So you can imagine what is next, a user wants to navigate down to one of the child folders and add a document: We have given them the id of the folder that they now want to access, and allow them to pass it to the function that *should* change the directory. But it doesn't. //set directory by id *DOES NOT WORK*public void accessDirectoryById(int id) throws Exception { debug("accessDirectoryById:"+id); // Access directory LLValue dirInfo = new LLValue().setAssocNotSet(); dirInfo.add("ID", id); dirInfo.add("VolumeID", this.parentID); //I would think this would do it, GetObject doesn't work for me either. //and the API is opaque at best. this.status = this.documents.AccessPersonalWS(dirInfo); if ( this.status == 0 ) { pwsInfo = dirInfo; debug("it worked."); String name = pwsInfo.toString( "Name" ); parentVol = pwsInfo.toInteger( "VolumeID" ); parentID = pwsInfo.toInteger( "ID" ); debug ( "Accessed Directory:"+name ); } else handelError(); } I know this comes from not understanding the API but honestly in all the code samples and posts I have seen no one is trying to do this.Clay
Find more posts tagged with
Comments
There are no comments yet