on 04-22-2011 8:41 PM
Hi all,
I am trying to create a custom attribute in the user profile for company codes.
I am trying to incorporate the same in the master head iView, and depending on this selection I should be changing the content in the content area.
I cannot use client-side eventing as my framework is light and needs to be like that to support high speed portal usage.
Hence I have come up with this approach of user profile attributes, but here I have only observed a way to get the attribute values but not set the values in the code. Can anybody please suggest how can I achieve this?
Thanks,
Harika
Hi,
Following code is used to set the custom attribute
API:http://help.sap.com/javadocs/nw04s/sps09/se/com/sap/security/api/IPrincipalMaint.html#setAttribute%28java.lang.String,%20java.lang.String,%20java.lang.String[]%29
IUserFactory userFact = UMFactory.getUserFactory();
IUserMaint modUser = userFact.getMutableUser(<<UNIQUE ID>>);
modUser.setAttribute("com.test", "Custom Param", value );
Regards,
Ayyapparaj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.