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.

Since: 1.0

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 findByName(Set<String> groupNames)Finds PermissionSetGroups by developer names.
global PermissionSetGroup findByName(String developerName)Finds a PermissionSetGroup by developer name.
global override List getFields()Returns the core fields for PermissionSetGroup queries.
global SEL_PermissionSetGroup()Constructs a PermissionSetGroup selector with the PermissionSetGroup SObjectType.

Method Details

SEL_PermissionSetGroup

apex
global SEL_PermissionSetGroup()

Constructs a PermissionSetGroup selector with the PermissionSetGroup SObjectType.

Since: 1.0

Example:

apex
SEL_PermissionSetGroup instance = new SEL_PermissionSetGroup();

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:

  • 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

Since: 1.0

Example:

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

findByName

apex
global PermissionSetGroup findByName(String developerName)

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

Parameters:

  • 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

Since: 1.0

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

Since: 1.0

Example:

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