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.
Since: 1.0
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 getFields() | Returns the core fields for PermissionSet queries. |
| global SEL_PermissionSet() | Constructs a PermissionSet selector with the PermissionSet SObjectType. |
Method Details
SEL_PermissionSet
apex
global SEL_PermissionSet()Constructs a PermissionSet selector with the PermissionSet SObjectType.
Since: 1.0
Example:
apex
SEL_PermissionSet instance = new SEL_PermissionSet();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:
name(String) - The API name of the PermissionSet to retrieve (without namespace prefix)
Returns: PermissionSet - The matching PermissionSet, or null if not found
Since: 1.0
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
Since: 1.0
Example:
apex
List<SObjectField> result = instance.getFields();