Apex Developer 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 guide introduces you to the Apex development process and provides valuable information on learning, writing, deploying and testing Apex.

For reference information on Apex classes, interfaces, exceptions and so on, see Apex Reference Guide.

  • Apex Release Notes

    Use the Salesforce Release Notes to learn about the most recent updates and changes to Apex.

  • Getting Started with Apex

    Learn about the Apex development lifecycle. Follow a step-by-step tutorial to create an Apex class and trigger, and deploy them to a production organization.

  • Writing Apex

    Apex is like Java for Salesforce. It enables you to add and interact with data in the Lightning Platform persistence layer. It uses classes, data types, variables, and if-else statements. You can make it execute based on a condition, or have a block of code execute repeatedly.

  • Running Apex

    You can access many features of the Salesforce user interface programmatically in Apex, and you can integrate with external SOAP and REST Web services. You can run Apex code using a variety of mechanisms. Apex code runs in atomic transactions.

  • Debugging, Testing, and Deploying Apex

    Develop your Apex code in a sandbox and debug it with the Developer Console and debug logs. Unit-test your code, then distribute it to customers using packages.

  • Apex Reference

    In Summer ’21 and later versions, Apex reference content is moved to a separate guide called the Apex Reference Guide.

  • Appendices