trailhead

Work with Schema Builder

Learning Objectives

  • Describe the advantages of using Schema Builder for data modeling.
  • Use Schema Builder to create a schema for a given object model.
  • Use Schema Builder to add a custom object to your schema.
  • Use Schema Builder to add a custom field to your schema.

See Your Data Model in Action

By now, you and D’Angelo have created a handful of custom objects, fields, and relationships. Your app’s data model is starting to get a little more complicated.

Schema Builder is a tool that lets you visualize and edit your data model. It’s useful for designing and understanding complex data models like the one D’Angelo is building. Let’s take a look.

  1. From Setup, search for and click Schema Builder in the Quick Find box.
    Quick Find box location.
  2. In the left panel, click Clear All.
  3. Check Contact, Favorite, Offer, and Property.

You'll see something like this:

The user interface for the Schema Builder.

Notice that you can drag these objects around the canvas. This doesn’t change your objects or relationships, but it can help you visualize your data model in a useful way. Schema Builder is a handy tool for introducing your Salesforce customizations to a co-worker or explaining the way data flows throughout your system.

D'Angelo explaining the DreamHouse app schema to Michelle.

Create an Object with Schema Builder

Schema Builder is great for visualization, but you can also use it to customize your data model. For example, you can manage the permissions for your custom fields directly in Schema Builder. Just right-click the field name and click Manage Field Permissions.

You can also create objects using Schema Builder. If you prefer, you can create objects in this visual interface if you’re designing your system and want to be able to revise all your customizations on the spot. Let’s see how it’s done.

  1. In the left sidebar, click the Elements tab.
  2. Click Object and drag it onto the canvas.
  3. Enter information about your object. You can make it whatever you want!
  4. Click Save.

Your new object appears in the Schema Builder. That was quick! Next, let’s add some fields.

Create Fields with Schema Builder

Creating fields with Schema Builder is just like creating objects.

  1. From the Elements tab, choose a field type and drag it onto the object you just created. Notice that you can create relationship fields, formula fields, and normal fields in Schema Builder.
  2. Fill out the details about your new field.
  3. Click Save.

Cool! If you go back through Object Manager, you’ll see your new object shows up the same way your Property, Offer, and Favorite objects do.

A comparison of an object in Object Manager and Schema Builder.

Sum It Up

We’ve learned a lot in this module. First, we talked about the data model and the database. We covered objects, fields, and records and created some of each for our DreamHouse app. Then we talked about relationships between objects and how you can visualize your data model using Schema Builder.

As you start to dive into more advanced content, you’ll see custom objects and fields everywhere. Before you know it, you’ll be a data modeling pro. Happy building!

Resources

Lightning bolt icon used to indicate that the content is for Lightning Experience

Remember, this module is meant for Lightning Experience. When you launch your hands-on org, switch to Lightning Experience to complete this challenge.

retargeting