LLProstarter
Technical User
Hi!
How can I access the personal workspace of other persons to find out the volume and parentid. My target is to place a document in this directory.
LAPI_USERS user = new LAPI_USERS(session);
LLValue pwsInfo = ( new LLValue() ).setAssocNotSet();
LLValue objInfo = ( new LLValue() ).setAssocNotSet();
//////////////////////////////////////////////////////////////////////
//Code to Update a User's Info
//////////////////////////////////////////////////////////////////////
//Define the user's login name
String userName = "test";
//Load the user's info
LLValue attributes = (new LLValue()).setAssocNotSet();
if (user.GetUserInfo(userName, attributes) == 0)
{
documents = new LAPI_DOCUMENTS( session );
status = documents.AccessPersonalWS( pwsInfo );
if ( status == 0 )
{
Console.WriteLine( "Accessed Personal Workspace" );
parentVol = pwsInfo.toInteger( "VolumeID" );
Console.WriteLine("Id = " + parentVol);
parentID = pwsInfo.toInteger( "ID" );
Console.WriteLine("Id = " + parentID);
}
//1 Zeile ID holen
int test = attributes.toInteger("ID");
Console.WriteLine("Id = " + test);
Console.WriteLine("Id = " + attributes.toString("ID"));
Console.WriteLine("Name = " + attributes.toString("Name"));
Console.WriteLine("FirstName = " + attributes.toString("FirstName"));
Console.WriteLine("LastName = " + attributes.toString("LastName"));
Can Someone post a example, please.
Thank you for any advice.
Regards
Christian
How can I access the personal workspace of other persons to find out the volume and parentid. My target is to place a document in this directory.
LAPI_USERS user = new LAPI_USERS(session);
LLValue pwsInfo = ( new LLValue() ).setAssocNotSet();
LLValue objInfo = ( new LLValue() ).setAssocNotSet();
//////////////////////////////////////////////////////////////////////
//Code to Update a User's Info
//////////////////////////////////////////////////////////////////////
//Define the user's login name
String userName = "test";
//Load the user's info
LLValue attributes = (new LLValue()).setAssocNotSet();
if (user.GetUserInfo(userName, attributes) == 0)
{
documents = new LAPI_DOCUMENTS( session );
status = documents.AccessPersonalWS( pwsInfo );
if ( status == 0 )
{
Console.WriteLine( "Accessed Personal Workspace" );
parentVol = pwsInfo.toInteger( "VolumeID" );
Console.WriteLine("Id = " + parentVol);
parentID = pwsInfo.toInteger( "ID" );
Console.WriteLine("Id = " + parentID);
}
//1 Zeile ID holen
int test = attributes.toInteger("ID");
Console.WriteLine("Id = " + test);
Console.WriteLine("Id = " + attributes.toString("ID"));
Console.WriteLine("Name = " + attributes.toString("Name"));
Console.WriteLine("FirstName = " + attributes.toString("FirstName"));
Console.WriteLine("LastName = " + attributes.toString("LastName"));
Can Someone post a example, please.
Thank you for any advice.
Regards
Christian