Learning Objectives

After completing this unit, you will be able to:
  • 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.

Schema Builder

Schema Builder provides a dynamic environment for viewing and modifying all the objects and relationships in your app. This greatly simplifies the task of designing, implementing, and modifying your data model, or schema.

You can view your existing schema and interactively add new custom objects, custom fields, and relationships, simply by dragging and dropping. Schema Builder automatically implements the changes and saves the layout of your schema any time you move an object. This eliminates the need to click from page to page to find the details of a relationship or to add a new custom field to an object in your schema.

Schema Builder provides details like the field values, required fields, and how objects are related by displaying lookup and master-detail relationships. You can view the fields and relationships for both standard and custom objects.

Schema Builder interface
Schema Builder is enabled by default and lets you add the following to your schema:
  • Custom objects
  • Lookup relationships
  • Master-detail relationships
  • All custom fields except: Geolocation
Note

Note

You can’t export your schema from Schema Builder (for example, to use the schema in another org).

How Do I Access Schema Builder?

From Setup, enter Schema Builder in the Quick Find box, then select Schema Builder.

When working with Schema Builder:

  • Click an object and move it to any space on the canvas. Schema Builder saves the layout of your schema any time you move an object.
  • Click Auto-Layout to sort the layout of the objects in your schema.
    Important

    Important

    When you click Auto-Layout, you can’t undo it.

  • Click View Options to:
    • Display Element Names if you prefer system names, or Display Element Labels if you prefer text values.
    • Show/Hide Relationships
    • Show/Hide Legend
  • The Elements tab lets you drag and drop new custom objects and fields onto the canvas.
  • The Objects tab lets you select objects to display on the canvas.
    • Click the drop-down list in the sidebar to filter your list of objects:
      • All Objects
      • Selected Objects
      • Standard Objects
      • Custom Objects
      • System Objects
        Note

        Note

        Objects created outside of Schema Builder, such as through an app or the API, don’t automatically display on the canvas. Select the checkbox for the object created outside Schema Builder to display it on the canvas.

    • To search for an object, type its name in the Quick Find box.
    • Hover over an object in your list of objects and click search icon to find it on the canvas.
  • Hover over relationship lines to show relationship details such as lookup and master-detail relationships. Click the name of the object to find it on the canvas. You can hide relationships if your schema is taking too long to load.
  • To view the details of a field in a new window, right-click the element name or label and select View Field in New Window.
  • To edit properties of a custom field, right-click the element name or label and select Edit Field Properties.
  • To manage permissions of a custom field, click the element name or label and select Manage Field Permissions.
  • Click object in new window to:
    • Hide Object on Canvas
    • View Object detail in a new window
    • View Page Layouts detail in a new window
  • For objects with many fields (Lead or Campaign, for example), click Show More Fields to display all the fields.
  • To zoom in, click zoom in. To zoom out, click zoom out.
    Note

    Note

    You can’t save the level of zoom when closing Schema Builder.

  • To collapse the sidebar, click collapse icon. To expand it, click expand icon.
  • The map in the lower right corner shows the overall layout of your objects on the canvas. Click the map to navigate the layout of your objects. To pan across the schema layout while zoomed in, click and hold the canvas while moving the mouse.
  • To close the Schema Builder and save the layout of your objects, click Close.
Important

Important

If your schema contains many objects and fields, loading can take a long time. Click Hide Relationships to improve Schema Builder performance.

Create Objects with Schema Builder

To create a custom object with Schema Builder:
  1. Click the Elements tab.
  2. Click Object and drag it onto the canvas.
  3. Enter information to define your object. For a list of object definitions, see Schema Builder Custom Object Definition.
  4. Click Save.

Delete Custom Objects with Schema Builder

You can delete the custom objects that you no longer need by using Schema Builder.

Schema Builder displays a list of side effects when you try to delete a custom object. Be sure you’re ready to accept these side effects before finalizing the deletion.

  1. Click object in new window on the custom object’s icon.
  2. Select Delete Object.... A dialog box displays that explains the side effects of deleting an object. Read this information carefully.
  3. If you accept the conditions, check Yes, I want to delete the custom object.
  4. Click Delete.

Create Fields with Schema Builder

To create a custom field with Schema Builder:
  1. Click the Elements tab.
  2. Click a field and drag it onto an object on the canvas.
  3. Enter a Field Label.

    Salesforce populates Field Name using the field label. This name can contain only underscores and alphanumeric characters, and must be unique in your org. It must begin with a letter, not include spaces, not end with an underscore, and not contain two consecutive underscores.

  4. Enter a Description of the custom field.
  5. Enter Help Text to detail the purpose and function of a custom field.
  6. Enter a Default Value to automatically insert a value of a custom field when a new record is created.
  7. Depending on the custom field type you choose, enter any remaining field attributes.
  8. Click Save.

Any field you add through Schema Builder isn’t automatically added to the page layout. You will need to edit the page layout to specify where the field should be displayed.

Beyond the Basics

By default, the field level security for custom fields is set to visible and editable for internal profiles. Fields that are not normally editable, such as formulas and roll-up summary fields, are visible and read-only. To manage permissions of a custom field, click the element name or label and select Manage Field Permissions.

Delete Custom Fields with Schema Builder

Conveniently avoid “custom field clutter” by using Schema Builder to delete custom fields that you no longer need.

Schema Builder displays a list of side effects when you try to delete a custom field. Be sure you’re ready to accept these side effects before finalizing the deletion.

  1. Right-click on the custom field.
  2. Select Delete Field.... A dialog box displays that explains the side effects of deleting a custom field. Read this information carefully.
  3. If you accept the conditions, check Yes, I want to delete the custom field.
  4. Click Delete.
Share Time Estimate

Having trouble with your challenge verification?

Here are some tips:

  1. Check for typos (hey, it happens)
  2. Try using a new Developer Edition (existing customizations can interfere with the validation)