How to get role/s of currently logged on user
Trying to pass the currently logged on users role to a hidden field. Have found this function frevvo.roles()
but not having any luck. Can you point me in right direction.
-
Hi Mike,
Please see this business rule example which shows how to get currently logged in user's roles.
-Prajakta
0 -
Thanks so much, exactly what i was looking for.
0 -
So, part of this rule i'm building is to take the current logged on user's role and then get their manager/principal based on the current logged on users role and the the manager being in a principal group(their also in the same group as the logged on user). I thought i could use this function frevvo.userIds() with 2 roles as variables, but it seems to be an "or" instead of an "and". I end up getting all users from both roles instead of just the one manager. Got any ideas? Could i just make a new function based on the original and change it to an "and"?
0 -
Unless you have a better approach, i went ahead and took the resulting array and since the principal was in it twice and will always be the only one in both groups, found that duplicate value and used it to populate the principal field.
0 -
Mike,
I can't think of a better way to do this than what you are doing.
-Prajakta
0
Please sign in to leave a comment.
Comments
5 comments