Salesforce Dictionary - Free Salesforce GlossarySalesforce Dictionary
DictionaryAApex Classes
DevelopmentIntermediate

Apex Classes

Apex Classes is a Setup page that lists all Apex classes in the org, including their namespace, API version, status, and size.

§ 01

Definition

Apex Classes is a Setup page that lists all Apex classes in the org, including their namespace, API version, status, and size. Administrators and developers use this page to view, create, edit, compile, and manage Apex classes, as well as to schedule Apex jobs and check code coverage.

§ 02

In plain English

👋 Study buddy

Here's a simple way to think about it: Apex Classes is the inventory page of every custom code class in your org. Every class some developer wrote, every class a managed package installed - they're all listed here, with their version, status, and last-modified date.

§ 03

Worked example

scenario · real-world use

A developer at Cresthaven Logistics navigates to Setup ▸ Apex Classes to review the 320 classes in the org ahead of a deploy. She filters to classes with "Handler" in the name, spots a "LeadAssignmentHandler" that's throwing warnings in production logs, clicks Edit to rework the bulk logic, then runs its associated test class directly from the Apex Classes page. All tests pass with 94% coverage, so she commits the change to her DX Project and queues it in the next Release Train.

§ 04

Why Apex Classes is the inventory of every code class running in your org

Apex Classes is the Setup page that lists every Apex class currently deployed - name, namespace, API version, status, size. For an admin auditing the org's code surface, this is the canonical inventory. New classes appear here when developers deploy them; old classes linger here until somebody deletes them. Code coverage, scheduled-job assignment, and class-level operations all happen from this page.

The reason it earns regular admin attention even on orgs with dedicated dev teams is that Apex code accumulates the way Custom Objects do. A managed package's classes show up here, a former contractor's classes sit unused for years, classes from old features still reference fields that don't exist. Audit the list quarterly with the dev team, archive what's unused, and prevent the org from carrying years of unmaintained code that nobody understands.

§ 05

How to set up Apex Classes

Apex Classes is the Setup page where Apex code lives — class metadata, version, status (Active / Deprecated), test coverage. Most modern orgs deploy Apex via DX or Change Sets, not the Apex Classes Setup page directly. The page is mostly for review and quick edits.

  1. Open Setup → Apex Classes

    Setup gear → Quick Find: Apex Classes → Apex Classes.

  2. Review the list of classes

    Each row: Name, Last Modified, Status, API Version, Lines of Code (read from Modified Source).

  3. Click New for in-Setup class creation (rare)

    Most code is deployed from outside Setup. The New button creates a class via the inline editor — fine for tiny utility classes, awkward for real development.

  4. Click into a class for source

    Source code, with Compile errors highlighted if any. Edit inline (in production this requires Modify Metadata permission).

  5. For test coverage: click Test → Run Tests

    Runs the test methods on this class. Coverage shown in real time.

  6. For dependency analysis: click Show Dependencies

    Lists what other metadata references this class — useful before deletion.

Key options
API Versionremember

What version of the Salesforce API the class targets. Older versions get fewer Salesforce features.

Statusremember

Active (deployed and running) / Deprecated (callable but flagged for removal).

Compile Errorsremember

Surface inline. Deploy fails if any Apex Class has compile errors.

Gotchas
  • Editing Apex inline in Setup → Apex Classes is allowed in sandboxes by default but requires the Modify Metadata permission in production. Many orgs lock this down.
  • Renaming an Apex class is a destructive operation. References to the old name break — rename via deploy with a careful migration path.
  • API Version locks features available to the class. A class on API 30 can't use Modern Apex features (System.JSON improvements, etc.). Bump to current API only after testing.
§ 06

How organizations use Apex Classes

Northwind Trading

Quarterly review of Apex Classes catches unused code from former contractors; the team removes ~10% of the catalog each year as deliberate technical-debt cleanup.

Cypress Therapeutics

Compliance reviews use Apex Classes as the inventory for security audits; every class is mapped to its purpose and risk classification.

Pacific Crest Bank

DevOps teams cross-reference Apex Classes against version control to identify drift between deployed code and the canonical Git repository.

§

Trust & references

Official documentation

Straight from the source - Salesforce's reference material on Apex Classes.

Keep learning

Hands-on resources to go deeper on Apex Classes.

Was this entry helpful?
Help us write better definitions. Quick reactions or detailed edit suggestions.
§

Test your knowledge

Q1. What is a Governor Limit in the context of Apex Classes?

Q2. Where would a developer typically work with Apex Classes?

Q3. What is required before deploying Apex Classes-related code to production?

§

Discussion

Loading…

Loading discussion…