You need to sign in to do that
Don't have an account?
vleandro
Getting Queue Memebers and their respective Permission Set
I have a class that currently does a great job of getting a Queue and then listing all the users for that queue. Code works great. I present the query snippit here for reference.
My visualforce page presents the user with the Queue they selected and the users who are members of that Queue (along with their attributes such as name, profile, role, etc.).
Now I want to bring in those users' permission sets.
I know I can do a SELECT statement against the PermissionSetAssignment object:
However, I'm struggling with how to build this into the query I have above. I'm a fairly new developer so any assistance or suggestions would be greatly appreaciated!
Thank you!
Virginia
// provide queue name to show on page public Group selectedQueue { get { return [ SELECT id, name FROM group WHERE id = :queueId ]; } } // list of all active queue members public List<User> queueMembers { get { return [ SELECT id, firstName, lastName, username, email, userRole.name, profile.name FROM user WHERE id IN (SELECT userOrGroupId FROM groupmember WHERE groupId = :queueId ) AND isActive = true ORDER BY firstName ASC ]; } }
My visualforce page presents the user with the Queue they selected and the users who are members of that Queue (along with their attributes such as name, profile, role, etc.).
Now I want to bring in those users' permission sets.
I know I can do a SELECT statement against the PermissionSetAssignment object:
SELECT Assignee.Name, Assignee.ID, PermissionSet.Label FROM PermissionSetAssignment WHERE PermissionSet.IsOwnedByProfile = FALSE
However, I'm struggling with how to build this into the query I have above. I'm a fairly new developer so any assistance or suggestions would be greatly appreaciated!
Thank you!
Virginia
Here's the code I'm focusing in on.
Notice I've now added a new method for PermissionSetAssignment. However, the following line is giveing me trouble:
I get the following error:
Save error: Invalid bind expression type of Schema.SObjectField for column of type Id.
I suspect it's because the ID for User isn't available to this public class? How can I rewirte such that the user.id is available in the permission set query?