Salesforce Platform Developer I Certification Guide
上QQ阅读APP看书,第一时间看更新

Visualizing and creating entity relationships

There is another way though to see, create, and update your data model in Salesforce, and that's through a specific graphical interface called Schema Builder.

In the following screenshot, you get a visual representation of the objects created for our BIM DB app in the Schema Builder. The Schema Builder can be found in Setup | Schema Builder. You can select/deselect the objects you want to visualize on screen in the sidebar, and drag and drop the screens so that you get a clear overview of all relations between those selected objects:

So, Schema Builder is a tool to view and modify your Salesforce org data model. It simplifies the task of designing, implementing, and modifying your data model or schema.

As previously mentioned, you are not only able to view your existing schema, but you can also interactively add new custom objects, custom fields, and relationships, by simply clicking, dragging, and dropping elements from the sidebar onto the canvas:

Schema Builder is enabled by default, and it lets you do the following things:

  1. Jump directly to the object and layout page that you are used to from Setup.
  2. Create custom objects.
  3. Delete custom objects.
  4. Edit custom object properties.
  5. Create any custom field with the exception of the Geolocation type.
  6. Create relationships such as lookup and/or master-detail between objects.
  7. Delete custom fields.

The Schema Builder has an autosave functionality that will implement your changes immediately and save the layout of your schema when you move an object on the canvas. The biggest benefit is that you don't need to click from page to page in Setup to find a relationship or to add a new custom field to an object. The Schema Builder shows details such as the type of fields, which fields are required, and how objects are related to one and other.

Some facts to keep in mind while using Schema Builder are as follows:

  • While creating new fields through Schema Builder, they are not automatically added to your page layouts. You'll need to edit the page layout manually to specify where the new field should be displayed.
  • The field-level security for fields created through Schema Builder is set to Visible and Editable for all internal profiles.
  • Managing these permissions can be done by clicking on the element name and then selecting Manage Field Permissions.