Intermediate 20 min read

Standard Objects

By the end of this lesson, you'll be able to:

  • Explain what a standard object is and name several common ones
  • Reference a standard object and its fields in Apex
  • Recognize that standard objects come built into every Salesforce org

Prerequisites: Module 17: "Project: Employee Management"

What a standard object is

Every Salesforce org comes pre-loaded with a set of common business objects: Account (companies or organizations), Contact (individual people), Opportunity (a potential sale), Case (a customer support issue), and many more. These are standard objects — Salesforce defines their structure, and they're available immediately in every org, with no setup required.

Referencing a standard object in Apex

Account acc = new Account();
acc.Name = 'Acme Logistics';
acc.Industry = 'Transportation';

System.debug(acc.Name); // "Acme Logistics"

Account behaves like any class you've written yourself — new Account() creates one, and its fields (Name, Industry, and many more) are accessed with the same dot notation from Module 10. The difference is that Salesforce defined this class's shape, not you.

A tour of common standard objects

Object Represents
Account A company or organization
Contact An individual person, usually linked to an Account
Opportunity A potential or in-progress sale
Case A customer support issue
Lead A potential customer not yet qualified
User A person who logs into Salesforce

These aren't the only standard objects, but they're the ones you'll encounter constantly in real Apex code across almost any Salesforce org.

Exercise

Create an Account in memory (not saved to the database) with a Name and an Industry, then debug both fields.

Show hint

Account acc = new Account(); acc.Name = ...;

APEX

Standard Objects Quiz

1. What is a standard object?

Log in to submit the quiz and save your score.

My Notes

Log in to keep private notes on this lesson.

Questions about this lesson

No questions yet — be the first to ask.

Log in to ask a question about this lesson.

Summary

A standard object is a data structure Salesforce provides out of the box in every org — Account, Contact, Opportunity, and dozens more — ready to use without any setup.