Hi,
I need to be able to get the User roles of the owner of a record. Am able to get CurrentUserRoles but the current user may not be the owner of the record that has been selected. The reason for this is that we have an entity called staff records for one of the services that our organization provides.
Staff (of that service) may fit into one of 3 categories:-
- Management,
- Team Leaders, &
- Support staff.
Team leaders need to be able to see the records of Support staff but not there own or other Team leader records - so when they open a record the code (javascript) needs to be able to check whether that record belongs to a Support staff person or another Team leader (i.e. their being a Team leader is defined by a particular security role).
So I was hoping to find some function along the lines of 'getSecurityRoles(userGUID)' which, I assume, would return an array of the User's roles (guids) from which I could then match a role and immediately close the form/record if necessary - i.e. if it belonged to another Team Leader.
If anyone can help me with the code to resolve this it'd be greatly appreciated.
Regards, Doug.