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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Setting user name

Status
Not open for further replies.

matasa

Programmer
Jan 29, 2009
13
US
Hello,
With the help of different examples I found I'm able to create compounds document and the document underneath with the correct category I want ... excepted user name fields.
Which lead to error "101103" from CreateObjectEx.

To set this field I use:
(...)
LLValue attrValuesb = new LLValue().setList();

attrValuesb.add(args[1]);
if(attr.AttrSetValues(catVersion,"Author",attr.ATTR_DATAVALUES, attrValPath, attrValuesb) != 0)
{
System.out.println("AttrSetValues Failed."); return;
}
(...)
Then there is the call to CreateObjectEx:
status = doc.CreateObjectEx(volumeID,objectID2,LAPI_DOCUMENTS.OBJECTTYPE,LAPI_DOCUMENTS.COMPOUNDDOCUMENTSUBTYPE,"MyOwnCompoundDoc_"+fina,createInfo,objectInfo);

which fails.

I also tried ATTR_TYPE_USER without greater succes. When I set manually an existing user name on web interface it works. When I push the same user name thru the API it does not work.
Maybe I'm missing something, any hint will be appreciated.
Thanks in advance.



 
Thanks Greg for your answer,
I was ablee to create the category, but when I create adocument (say a compound document) and i want to attach a category, if I want to set a user field it fails whereas other such as text or integer or even date are fine. Maybe user field has something special I don't master.
Thanks.
 
I used the userid as an integer because that is how livelink stores it internally.I rigged up this quick and dirty sample in case you want to see what I did.
Code:
[URL unfurl="true"]http://communities.opentext.com/communities/llisapi.dll/open/8555544[/URL]

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
 
Userid as an integer, it was the trick, I should have known it :)

It works now, thank you very much for your help.


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top