I have a query:

public static List<ID> returnUserPermIds(){
    List<PermissionSetAssignment> permissionSetAssignments = [SELECT PermissionSetId from PermissionSetAssignment where PermissionSetId = '0PSq00000001rt9GAA'];
    List<ID> permissionSetIds = new List<ID>();
    for(PermissionSetAssignment assignment: permissionSetAssignments){
    return permissionSetIds;

I need to know how to call on this method in another Apex class. After I call it in the apex class I need to call on it from a component. Write now I am trying to convert the return value, so that I can either say yes user has value or no value. Any ideas on how to call on this from another Apex class?

  • How does Kris's answer on the previous question not cover this? Can you be more specific about this problem, if it is distinct?
    – David Reed
    Commented Feb 14, 2020 at 15:45
  • So, I've re-factored code. Which now returns just an ID. I know same question, but what .isEmpty() returns the value true no matter if a user has the perm set or not. If i try !.isEmpty() it returns a false value regardless if user has perm set or not.
    – Gev
    Commented Feb 14, 2020 at 15:59


You must log in to answer this question.

Browse other questions tagged .