Skip to content

SEL_PermissionSetGroup

Class · Group: Selectors

apex
global inherited sharing class SEL_PermissionSetGroup extends SEL_Base

Extends: 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

apex
PermissionSetGroup foundGroup = new SEL_PermissionSetGroup().findByName('ReadOnly');
List<PermissionSetGroup> groups = new SEL_PermissionSetGroup().findByName(new Set<String>{'ReadOnly', 'EditAccess'});

See Also: SEL_Base


Methods

MethodDescription
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

apex
global List<PermissionSetGroup> findByName(Set<String> groupNames)

Finds PermissionSetGroups by developer names. In test context, recalculates groups that are not yet updated.

Parameters

ParameterTypeDescription
groupNamesSetA set of unique developer names of the PermissionSetGroup records to retrieve

Returns PermissionSetGroup — A list of PermissionSetGroup records that match the specified names

Example

apex
Set<String> names = new Set<String>{'ReadOnly', 'EditAccess'};
List<PermissionSetGroup> groups = new SEL_PermissionSetGroup().findByName(names);
apex
global PermissionSetGroup findByName(String developerName)

Finds a PermissionSetGroup by developer name. Returns the first match or null.

Parameters

ParameterTypeDescription
developerNameStringThe 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

apex
PermissionSetGroup foundGroup = new SEL_PermissionSetGroup().findByName('ReadOnly');

getFields

apex
global override List<SObjectField> getFields()

Returns the core fields for PermissionSetGroup queries.

Returns SObjectField — List of PermissionSetGroup SObjectField tokens

Example

apex
List<SObjectField> result = instance.getFields();

Constructors

ConstructorDescription
global SEL_PermissionSetGroup()Constructs a PermissionSetGroup selector with the PermissionSetGroup SObjectType.

SEL_PermissionSetGroup()

apex
global SEL_PermissionSetGroup()

Constructs a PermissionSetGroup selector with the PermissionSetGroup SObjectType.

Example

apex
SEL_PermissionSetGroup instance = new SEL_PermissionSetGroup();