SEL_PermissionSet
Class · Group: Selectors
apex
global inherited sharing class SEL_PermissionSet extends SEL_BaseExtends: SEL_Base
Selector for the PermissionSet SObject. Provides default field configuration and query methods for PermissionSet records, including namespace-aware lookup.
Example
apex
PermissionSet adminSet = new SEL_PermissionSet().findByName('Administrator');
PermissionSet permissionSet = (PermissionSet)new SEL_PermissionSet().findById(permissionSetId);See Also: SEL_Base
Methods
| Method | Description |
|---|---|
| global PermissionSet findByName(String name) | Retrieves a PermissionSet record by name, searching both subscriber org (NamespacePrefix = null) and managed package namespace. |
| global override List<SObjectField> getFields() | Returns the core fields for PermissionSet queries. |
findByName
apex
global PermissionSet findByName(String name)Retrieves a PermissionSet record by name, searching both subscriber org (NamespacePrefix = null) and managed package namespace. Subscriber org version takes precedence.
Parameters
| Parameter | Type | Description |
|---|---|---|
name | String | The API name of the PermissionSet to retrieve (without namespace prefix) |
Returns PermissionSet — The matching PermissionSet, or null if not found
Example
apex
PermissionSet result = new SEL_PermissionSet().findByName('ReadOnly');getFields
apex
global override List<SObjectField> getFields()Returns the core fields for PermissionSet queries.
Returns SObjectField — List of PermissionSet SObjectField tokens
Example
apex
List<SObjectField> result = instance.getFields();Constructors
| Constructor | Description |
|---|---|
| global SEL_PermissionSet() | Constructs a PermissionSet selector with the PermissionSet SObjectType. |
SEL_PermissionSet()
apex
global SEL_PermissionSet()Constructs a PermissionSet selector with the PermissionSet SObjectType.
Example
apex
SEL_PermissionSet instance = new SEL_PermissionSet();