Dec 30, 2012

PeopleSoft : Check whether user belongs to a role through peoplecode:


IsUserInRole(rolename1 [, rolename2]. . .)

IsUserInRole() function is used to check whether current user has  the role in his profile or not.

This function returns  a Boolean value:
                                       True if the current user belongs to one or more of the roles in the user role array,
                                        False otherwise.


Example:
 local boolean &hasRole;
 &hasRole= IsUserInRole(CH_ROLE_EMPLOYEE);



&hasRole contains true if the currnet user has CH_ROLE_EMPLOYEE in his profile.

No comments:

Post a Comment