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.
Since: 1.0
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 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
global SEL_PermissionSetGroup()Constructs a PermissionSetGroup selector with the PermissionSetGroup SObjectType.
Since: 1.0
Example:
SEL_PermissionSetGroup instance = new SEL_PermissionSetGroup();findByName
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:
Set<String> names = new Set<String>{'ReadOnly', 'EditAccess'};
List<PermissionSetGroup> groups = new SEL_PermissionSetGroup().findByName(names);findByName
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:
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
Since: 1.0
Example:
List<SObjectField> result = instance.getFields();