SEL_PermissionSetGroup
Class · Group: Selectors
global inherited sharing class SEL_PermissionSetGroup extends SEL_BaseExtends: SEL_Base
Selector for the PermissionSetGroup SObject. Provides default field configuration and query methods for PermissionSetGroup records. In test context, automatically recalculates groups that are not yet updated.
Example
PermissionSetGroup foundGroup = new SEL_PermissionSetGroup().findByName('ReadOnly');
List<PermissionSetGroup> groups = new SEL_PermissionSetGroup().findByName(new Set<String>{'ReadOnly', 'EditAccess'});See Also: SEL_Base
Methods
| Method | Description |
|---|---|
| global List<PermissionSetGroup> findByName(Set<String> groupNames) | Finds PermissionSetGroups by developer names. |
| global PermissionSetGroup findByName(String developerName) | Finds a PermissionSetGroup by developer name. |
| global override List<SObjectField> getFields() | Returns the core fields for PermissionSetGroup queries. |
findByName
global List<PermissionSetGroup> findByName(Set<String> groupNames)Finds PermissionSetGroups by developer names. In test context, recalculates groups that are not yet updated.
Parameters
| Parameter | Type | Description |
|---|---|---|
groupNames | Set | A set of unique developer names of the PermissionSetGroup records to retrieve |
Returns PermissionSetGroup — A list of PermissionSetGroup records that match the specified names
Example
Set<String> names = new Set<String>{'ReadOnly', 'EditAccess'};
List<PermissionSetGroup> groups = new SEL_PermissionSetGroup().findByName(names);global PermissionSetGroup findByName(String developerName)Finds a PermissionSetGroup by developer name. Returns the first match or null.
Parameters
| Parameter | Type | Description |
|---|---|---|
developerName | String | The unique developer name of the PermissionSetGroup to retrieve |
Returns PermissionSetGroup — The PermissionSetGroup record that matches the specified name, or null if no match is found
Example
PermissionSetGroup foundGroup = new SEL_PermissionSetGroup().findByName('ReadOnly');getFields
global override List<SObjectField> getFields()Returns the core fields for PermissionSetGroup queries.
Returns SObjectField — List of PermissionSetGroup SObjectField tokens
Example
List<SObjectField> result = instance.getFields();Constructors
| Constructor | Description |
|---|---|
| global SEL_PermissionSetGroup() | Constructs a PermissionSetGroup selector with the PermissionSetGroup SObjectType. |
SEL_PermissionSetGroup()
global SEL_PermissionSetGroup()Constructs a PermissionSetGroup selector with the PermissionSetGroup SObjectType.
Example
SEL_PermissionSetGroup instance = new SEL_PermissionSetGroup();