on 11-11-2008 9:30 AM
hi,
i am getting error on following line of code(second line).
user = (IUser)WDClientUser.getCurrentUser().getSAPUser();
portal_user_name = user.getUniqueID();
only thing is,it was working fine before.now it is not working.
i am getting error as null point exception.
please help on this error.
thanks in advance
jayesh talreja
Hi,
try the following line of code and see if it works:
user = (IUser)WDClientUser.getloggedInClientUser().getSAPUser();
portal_user_name = user.getUniqueID();
also make sure that the user exist in UME
Siddharth
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Try the following code for fetching the portal user name and other details.
Do remember to set Authentication as True.
IWDClientUser clientuser = WDClientUser.getCurrentUser();
IUser user = clientuser.getSAPUser();
String displayname = user.getDisplayName();
wdContext.currentContextElement().setDsiplayname(displayname);
String uniquename = user.getUniqueID();
wdContext.currentContextElement().setUniquename(uniquename);
String firstname = user.getFirstName();
wdContext.currentContextElement().setFirstname(firstname);
String uid = user.getUid();
wdContext.currentContextElement().setUid(uid);
String jobtitle = user.getJobTitle();
wdContext.currentContextElement().setJobtitle(jobtitle);
String lastname = user.getLastName();
wdContext.currentContextElement() .setLastname(lastname);
'
I hope this will be helpful to u.
Thanx.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Jayesh,
I am getting Portal User with the following code with out any problem, try this......
IWDClientUser user = WDClientUser.getLoggedInClientUser();
String name = user.getFirstName();
name = name" "user.getLastName();
Regards,
Lakshmi Prasad.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Are you able to get the other properties of User like First name Last name,Unique name with the Api.
Make sure that WD application Authentication property is set to true.
Also for that Particular user you can check in Identity Management whether the user credentials like Unique id exist in UME.
try login with different users and see if the problem persist only with a particular user.
siddharth
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.