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

LAPI - createUser returning the new user ID

Status
Not open for further replies.

TomBarrand

Programmer
Aug 9, 2000
162
0
0
GB
Hi,

I am using LAPI and Java to call createUser() to create a new Livelink user. The API documentation says that createUser() returns the unqiue user ID that Livelink allocates to the new user.

How do I get the user ID?

The code snippet I am using to call createUser is detailed below. Status always equals zero and not the user ID.

Thanks

Tom

status = users.CreateUser( newUsername, newUserPwd,
LAPI_USERS.PRIV_LOGIN | LAPI_USERS.PRIV_UAPI_SESSION |
LAPI_USERS.PRIV_DAPI_SESSION | LAPI_USERS.PRIV_WAPI_SESSION,
userData, LAPI_USERS.GROUP, group, row, id );

System.out.println("LL UID: "+status);
 
Looks like you missed something.Most lapi functions have several input and one ouput parmeter.It llosk to me form the documentation that the id that you are looking for is a member(LLvalue objects are data structure)
I have no means to test what I am saying but
status=0 means the api call executed without erors and you can hope to find your newly created person's id
by doing something like,please check the syntax

System.out.println("LL UID: "+id.toInteger("ID"));
If you wanted name you would do something like
System.out.println("LL name: "+id.toString("name"));


Once again read up on methods to manipulate the data objects returned.
In production worthy code you would always type test the return LLvalue object and use methods at your disposal to find out the members.If you search KB and look for PrintTypeTree you will understand what I mean.




Well, if I called the wrong number, why did you answer the phone?
James Thurber, New Yorker cartoon caption, June 5, 1937
 
somebody replied correctly at your KB posting.The code I have given you is erroneous I beleive,so much for putting stuff without actually testing it

System.out.println("LL UID: "+id.toInteger);

Well, if I called the wrong number, why did you answer the phone?
James Thurber, New Yorker cartoon caption, June 5, 1937
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top