Class Security

You can specify which users can execute methods in a particular top-level class based on their user profile or permission sets. You can only set security on Apex classes, not on triggers.

To set Apex class security from the class list page:

  1. From Setup, enter Apex Classes in the Quick Find box, then select Apex Classes.
  2. Next to the name of the class that you want to restrict, click Security.
  3. 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.
  4. Click Save.

To set Apex class security from the class detail page:

  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.

To set Apex class security from a permission set:

  1. From Setup, enter Permission Sets in the Quick Find box, then select Permission Sets.
  2. Select a permission set.
  3. Click Apex Class Access.
  4. Click Edit.
  5. Select the Apex classes that you want to enable from the Available Apex Classes list and click Add, or select the Apex classes that you want to disable from the Enabled Apex Classes list and click Remove.
  6. Click Save.

To set Apex class security from a profile:

  1. From Setup, enter Profiles in the Quick Find box, then select Profiles.
  2. Select a profile.
  3. In the Apex Class Access page or related list, click Edit.
  4. Select the Apex classes that you want to enable from the Available Apex Classes list and click Add, or select the Apex classes that you want to disable from the Enabled Apex Classes list and click Remove.
  5. Click Save.
Previous
Next