Getting Started

  • What is Trailhead
  • myTrailhead
  • Trailblazer Community
  • Career Growth

Learn

  • Trails
  • Trailmixes
  • Modules
  • Projects

Credentials

  • Superbadges
  • Certifications
  • Maintain Certifications

Salesforce

  • Salesforce.com
  • AppExchange
  • Developers
  • Help Portal
© 2026 Salesforce, Inc. All rights reserved. Privacy Terms of Use Trust Accessibility Cookie Preferences
SalesforceTrailhead
  • Today
Apex Basics & Database

Use sObjects

+100 Points~15 mins
Apex Basics & DatabaseUse sObjects

Topics

  • What Is an sObject?
  • Quiz

Looking for help?

Explore Help ResourcesShare Your Feedback
Learning Objectives

After completing this unit, you'll be able to:

  • Describe the relationship between sObjects and Salesforce records.
  • Create and modify an sObject in Apex.

What Is an sObject?

Every record in Salesforce maps to an sObject in Apex. An Account variable holds one account record; its fields are properties you read and set, like acct.Name.

Account acct = new Account(Name = 'Valley Health Partners', Phone = '(602) 555-0100');
Note
Creating an sObject in memory doesn't save it. You save it with DML, covered next.
Quiz
To complete this unit, you need to answer all the quiz questions correctly.
+100 Points

1What does an Account variable in Apex represent?

2Does creating an sObject save it to the database?

Second attempt earns 50 points. Three or more earns 25 points.
Previous unitGet Started with ApexNext unit Manipulate Records with DML