Salesforce - Developer - Schema Builder

salesforce-developer

// Salesforce - Developer - Tools - 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 is enabled by default and lets you add the following to your 
schema:

1. Custom objects

2. Lookup relationships

3. Master-detail relationships

4. All custom fields except: Geolocation

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

// To Access Schema Builder:

From Setup, enter Schema Builder in the Quick Find box, then select Schema 
Builder.  When working with Schema Builder:

1. 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.

2. Click Auto-Layout to sort the layout of the objects in your schema.  
   When you click Auto-Layout, you can’t undo it.

3. Click View Options to:
   a. Display Element Names if you prefer system names, or Display Element 
      Labels if you prefer text values.
   b. Show/Hide Relationships
   c. Show/Hide Legend

4. The Elements tab lets you drag and drop new custom objects and fields onto 
   the canvas.

5. The Objects tab lets you select objects to display on the canvas.
   a. Click the drop-down list in the sidebar to filter your list of objects:
      1. All Objects
      2. Selected Objects
      3. Standard Objects
      4. Custom Objects
      5. System Objects.  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. 
   b. To search for an object, type its name in the Quick Find box.
   c. Hover over an object in your list of objects and click search icon to 
      find it on the canvas.

6. 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.

7. 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.

8. To edit properties of a custom field, right-click the element name or label 
   and select Edit Field Properties.

9. To manage permissions of a custom field, click the element name or label and 
   select Manage Field Permissions. Click on the gear icon to:
   a. Hide Object on Canvas
   b. View Object detail in a new window
   c. View Page Layouts detail in a new window

10. For objects with many fields (Lead or Campaign, for example), click Show More 
   Fields to display all the fields.

11. To zoom in, click the plus icon. To zoom out, click the minus icon.

12. To collapse the sidebar, click collapse icon. To expand it, click expand 
   icon.

13. 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.

14. To close the Schema Builder and save the layout of your objects, click Close.

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

// To Create Objects 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.

// To Delete Custom Objects with Schema Builder:

1. Click on the gear icon 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.

// To Create Fields with Schema Builder:

1. Click the Elements tab.

2. Click a field type 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.

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.

// To Delete Custom Fields with Schema Builder:

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.
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License