Developer Guide | Reference

As a language, Apex is:

Apex is tailored for data access and data manipulation on the platform, and it enables you to add custom business logic to system events. While it provides many benefits for automating business processes on the platform, it is not a general purpose programming language.

Apex cannot be used to:

After reviewing the basics, you are ready to write your first Apex program—a very simple class, trigger, and unit test.

Case-insensitive. Fundamentally based on Java, but I don't think it runs in a JVM; the docs imply it's interpreted. There also appear to be a number of limits to Apex-hosted code (like ceilings on the number of database queries that can be executed). Fascinating in that it appears to really combine an OO language with a server-side stored-proc language like T/SQL or PL/SQL.

Tutorial talks about how to create a custom object (drive the GUI to Create|Custom Object and give it a name and fields), then a class that will be the target of a trigger invocation (class looks pretty much just like Java, or more accurately SQL/J), and then the trigger looks like this:

trigger HelloWorldTrigger on Book__c (before insert) {
   Book__c[] books =;

Reference guide lists a number of namespaces that provide functionality that aren't core to the language; looks like Apex is a one-stop shopping experience, with no concept of "libraries" per se.

Tags: language   platform   salesforce   object  

Last modified 19 September 2022