on 2011 Sep 22 6:03 PM
If a user is assigned to multiple org units within a single business role, he/she is given the option to select among the org units when Web UI is launched. After selecting, in the subsequent screens, how to find out dynamically which particular Org Unit he/she logged in through?
I appreciate your time. Thanks.
Hi Amar
to get the Business role or profile using user name, pls use the class CL_CRM_UI_PROFILE_DETERM and use the method DETERMINE_PROFILE_VIA_ORG_MGMT.
to determin the logged in role and its organiztion unit proceed as follows
1) Get the user orgunit and roles list using the above said class - methoid which returns table
2) once you got the result get the Business role the user is currently loged in by using the parameter id CRMT_UI_PROFILE it will return the current business role.
3) now read the table in point 1 with this busineess role where u will get the orgunit.
more over there is no static method for the class CL_CRM_UI_PROFILE_DETERM so either you have to create the instance for this class or simply copy the code in the method DETERMINE_PROFILE_VIA_ORG_MGMT and use the same code some where else in the other class method.
Hope this resolves your issue.
Thanks & Regards
Raj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Amar,
Try to call static method GET_ORG_UNIT of class CL_CRM_IC_SERVICES.
I think it will give the information you need
Kind regards,
Garcia
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Amar,
In that particular view, I've already had some difficulties to read the org. unit. At the time, I was trying to display the org.unit name in the message area. Since the time wasn't much, we leaved that idea, and only displayed the user name. Seems when the applications loads that view, it loads in a separate process where you don't have any information about the webui user.
In other components, the code I've supplied to you, works perfectly.
Maybe someone else can help you, with a different approach for there.
Kind regards and good luck,
Garcia
User | Count |
---|---|
29 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.