salesforce 后台获取权限集(permission set)所有用户list

2023-08-18 10:51:03 浏览数 (1)

代码语言:javascript复制
 // 查询可操作用户名单
 Set<String> userNameSet = new Set<String>();
 for (PermissionSetAssignment psa : [SELECT Assignee.Name,Assignee.username, PermissionSet.Id,
                                             PermissionSet.Profile.Name,
                                             PermissionSet.isOwnedByProfile,
                                             PermissionSet.Label
                                             FROM PermissionSetAssignment
                                             WHERE PermissionSet.Name= 'OnlineCsPermset']) 
 {
                                             userNameSet.add(psa.Assignee.username);
 }

0 人点赞