Apex Reference Guide

Apex is a strongly typed, object-oriented programming language that allows developers to execute flow and transaction control statements on the Salesforce Platform server, in conjunction with calls to the API. This reference guide includes built-in Apex classes, interfaces, enums, and exceptions, grouped by namespace. It also includes Apex DML statements to insert, update, merge, delete, and restore data in Salesforce.
For information on the Apex development process, see Apex Developer Guide.

In API version 51.0 and earlier, Apex Reference information was included in the Apex Developer Guide in the "Apex Language Reference" section.

Note

Keep these guidelines in mind regarding API version usage:

  • Salesforce strongly recommends that you use the latest available API version.
  • If you can't upgrade to the latest version yet, use API versions released in the past three years, for improved performance, security, and compatibility.
  • To reduce complexity, consolidate your Apex codebase to use the minimal number of API versions, ideally, just one API version.

For a non-exhaustive list of major Apex behavior changes across API versions, organized by version number, see Apex Versioned Behavior Changes.