---
schema_version: "1"
id: 8f84c4a14cb4edf4f3c322d87c0c2c840fc13d28ce4be25b5fdc5967f46724c8
title: Set Apex Class Access from the Class Detail Page
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/platform/264-0-0/code_apex_access_via_detail.md
canonical_url: https://help.salesforce.com/s/articleView?id=platform.code_apex_access_via_detail.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 262bbbfd86c3a7be4ba3d0615b1a0904d6e867efe2004969786f33d830efa8ff
description: Limit which users can execute methods in a particular top-level Apex class based on their profiles.
products:
  - Salesforce Platform
release: "264"
---
# Set Apex Class Access from the Class Detail Page

Limit which users can execute methods in a particular top-level Apex class based on their profiles.

### Required Editions

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small edition"><colgroup><col></colgroup><tbody><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Available in: Salesforce Classic (<a href="https://help.salesforce.com/s/articleView?id=xcloud.overview_edition_lex_only.htm&amp;type=5&amp;language=en_US" target="_blank">not available in all orgs</a>) and Lightning Experience</td></tr><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Available in: <span id="code_apex_access_via_detail__Apex_Code_editions_text"><a name="code_apex_access_via_detail__Apex_Code_editions_text"></a><strong>Enterprise</strong>, <strong>Performance</strong>, <strong>Unlimited</strong>, <strong>Developer</strong>, and <strong>Database.com</strong> Editions</span></td></tr></tbody></table>

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small permission">
        <colgroup>
          <col style="width:50%">
          <col style="width:50%">
        </colgroup>
        <thead class="slds-text-title_caps ">
          <tr class="">
            <th scope="colgroup" class="slds-cell-wrap" colspan="2" style="text-align:center;vertical-align:top;" id="d38557e80">User
              Permissions Needed</th>
          </tr>
        </thead>
        <tbody>
          <tr class="">
            <td data-label="User Permissions Needed" class="slds-cell-wrap" style="vertical-align:top;" headers="d38557e80 ">To set Apex class security:</td>

            <td class="slds-cell-wrap" style="vertical-align:top;" headers="d38557e80 ">
              <p>Manage Profiles and Permission Sets</p>
              <p>AND</p>
              <p style="margin-bottom:0;">View Setup and
                Configuration</p>
            </td>

          </tr>
        </tbody>
      </table>

1. From Setup, enter Apex Classes in the Quick Find box, then select **Apex Classes**.
2. Click the name of the class that you want to restrict.
3. Click **Security**.
4. Select the profiles that you want to enable from the Available Profiles list and click **Add**, or select the profiles that you want to disable from the Enabled Profiles list and click **Remove**.
5. Click **Save**.

#### See Also

- [Set Apex Class Access from the Class List Page](https://help.salesforce.com/s/articleView?id=platform.code_apex_access_via_list.htm&release=264.0.0&type=5 "Limit which users can execute methods in a particular top-level Apex class based on their profiles.")
- [Set Apex Class Access from Permission Sets](https://help.salesforce.com/s/articleView?id=platform.perm_sets_setting_apex_access.htm&release=264.0.0&type=5 "You can specify which methods in a top-level Apex class are executable for a permission set.")
- [Set Apex Class Access from Profiles](https://help.salesforce.com/s/articleView?id=platform.users_profiles_apex_access.htm&release=264.0.0&type=5 "Specify which methods in a top-level Apex class are executable for a profile.")