How to get role/s of currently logged on user

Comments

5 comments

  • Avatar
    Prajakta

    Hi Mike,

    Please see this business rule example which shows how to get currently logged in user's roles.

    -Prajakta

    0
    Comment actions Permalink
  • Avatar
    Mike Griffith

    Thanks so much, exactly what i was looking for. 

    0
    Comment actions Permalink
  • Avatar
    Mike Griffith

    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
    Comment actions Permalink
  • Avatar
    Mike Griffith

    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
    Comment actions Permalink
  • Avatar
    Prajakta

    Mike,

    I can't think of a better way to do this than what you are doing.

    -Prajakta

     

    0
    Comment actions Permalink

Please sign in to leave a comment.