# SEL_Profile

**Class** · Group: `Selectors`

Learn it: [Fast Start - Selectors](/fast-start-selectors) and [Selectors guide](/selectors-guide)

<div class="apex-member apex-class">

```apex
global inherited sharing class SEL_Profile extends SEL_Base
```

**Extends:** [SEL_Base](/reference/apex/sel-base)

Selector for the Profile SObject. Provides default field configuration, query methods, and commonly used profile name constants.

**Example**

```apex
Profile adminProfile = new SEL_Profile().findByName('System Administrator');
Profile standardUser = new SEL_Profile().findByName('Standard User');
Profile profile = (Profile)new SEL_Profile().findById(profileId);
```

**See Also:** [SEL_Base](/reference/apex/sel-base)

</div>

---

## Methods

| Method | Description |
|--------|-------------|
| global [Profile](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_profile.htm) [findByName](#findbyname)([String](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_string.htm) profileName) | Finds a Profile record by name. |
| global override [List](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_list.htm)<[SObjectField](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_Schema_SObjectField.htm)> [getFields](#getfields)() | Returns the core fields for Profile queries. |

### findByName

<div class="apex-member">

```apex
global Profile findByName(String profileName)
```

Finds a Profile record by name. Results are cached within the transaction
to avoid repeated SOQL queries for the same profile.

**Parameters**

| Parameter | Type | Description |
|-----------|------|-------------|
| `profileName` | [String](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_string.htm) | The name of the profile to retrieve |

**Returns** [Profile](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_profile.htm) — The matching Profile record, or null if not found

**Example**

```apex
Profile adminProfile = new SEL_Profile().findByName('System Administrator');
```

</div>

### getFields

<div class="apex-member">

```apex
global override List<SObjectField> getFields()
```

Returns the core fields for Profile queries.

**Returns** [SObjectField](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_Schema_SObjectField.htm) — List of Profile SObjectField tokens

**Example**

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

</div>

## Constructors

| Constructor | Description |
|-------------|-------------|
| global [SEL_Profile](#constructors)() | Constructs a Profile selector with the Profile SObjectType. |

### SEL_Profile()

<div class="apex-member">

```apex
global SEL_Profile()
```

Constructs a Profile selector with the Profile SObjectType.

**Example**

```apex
SEL_Profile instance = new SEL_Profile();
```

</div>
