2

If I know the Role Id of the logged in the User. Can I determine which Groups the Role Id is associated with?

When I query the GroupMember object - using something like this

SELECT Id, Group.Type, GroupId, UserOrGroupId FROM GroupMember where GroupId = '00G8E000000mgQ2'

I can see the correct total of records - but not sure how to query based on the Role Id.

3

You can query Group Object directly for that

[Select Id,Name from Group where RelatedId =:roleID]

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.