Sub topic 8
Working in Object Manager
Object Manager is the part of Setup where you configure objects: their fields, layouts, rules, and related settings. This chapter assumes you can already open Setup from the gear icon and use Quick Find. It also assumes you know what objects, fields, and records are. You need a Developer Edition org or a sandbox where you can safely change things.
What Object Manager is
Setup has two kinds of configuration. Org-wide settings, such as sharing defaults or session security, live in the Setup menu. Settings that belong to one object live in Object Manager. Object Manager is the tab labeled Object Manager next to Home at the top of Setup.
When you open it, you see a table of every object in the org, with these columns:
| Column | What it tells you |
|---|---|
| Label | The name users see, such as Account |
| API Name | The name code and integrations use, such as `Account` or `Project__c` |
| Type | Standard, Custom, or another kind such as an external object |
| Description | A note from whoever created the object |
| Last Modified | When the object's configuration last changed |
| Deployed | Whether the object is available to users |
Custom objects and custom fields have API names that end in __c. Many mistakes in formulas, reports, and code come from using the label where the API name is required, so check the API Name column.
Finding an object
The list can have hundreds of rows. Use the search box above the table, which filters by label or API name as you type. You can also sort by clicking a column heading. Sorting by Last Modified is a quick way to see which objects someone changed recently.
Quick Find in the Setup sidebar does not list objects here. It searches Setup menu pages. Searching "Account" there will not take you to the Account object. Use the search box inside Object Manager for that.
The object detail page
Click an object's label to open its detail page. The left sidebar lists the areas you can configure. The exact list depends on the object and your edition, but these are the ones you will use most.
| Sidebar item | Use it to |
|---|---|
| Details | See the API name, description, and object-level settings such as whether reports, history tracking, and search are enabled. |
| Fields & Relationships | View, create, and edit fields, including lookup and master-detail relationships. |
| Page Layouts | Control which fields, buttons, and related lists appear on a record page. |
| Lightning Record Pages | Arrange components on the record page with Lightning App Builder. |
| Buttons, Links, and Actions | Manage quick actions and custom buttons. |
| Compact Layouts | Choose the fields shown in the highlights panel and on mobile cards. |
| Record Types | Offer different picklist values and layouts for different business processes. |
| Validation Rules | Block saves that break a condition you define. |
| Triggers | See the Apex triggers on the object. |
| Search Layouts | Choose the columns users see in search results and list views. |
The diagram shows how the pieces relate.
Working with fields
Open Fields & Relationships to see every field on the object. The table shows each field's label, API name (shown as Field Name), data type, and whether it is indexed. Standard fields and custom fields appear together. Click New to start the field wizard.
The wizard has the same steps for most data types:
- Choose the data type, such as Text, Picklist, Lookup Relationship, or Formula.
- Enter the label and API name, plus type-specific options such as length or picklist values.
- Set field-level security, which decides which profiles can see or edit the field.
- Choose which page layouts should include the field.
Steps 3 and 4 cause most "I created the field but I can't see it" problems. If you leave visibility unset or skip a layout, the field exists but users cannot see it. When that happens, check these in order:
- Is the field on the page layout the user's profile or record type uses?
- Does the user's profile or a permission set grant field-level security?
- If the page uses a Lightning Record Page, does it show a record details component that reads from the layout?
Some limits matter when you plan changes. You cannot change a field's data type freely once it holds data. For example, changing some types can cause data loss, and Salesforce warns you before it proceeds. Deleting a custom field moves it to a deleted-fields list, where you can restore it for a limited time before it is purged. Fields referenced by formulas, validation rules, flows, or Apex cannot be deleted until you remove the references. The Where is this used? button on a field's detail page shows those references, so use it before you delete or rename anything.
Page layouts and Lightning Record Pages
These two features overlap, and mixing them up is the most common confusion in Object Manager.
- A page layout decides which fields, sections, buttons, and related lists a record has. It is assigned by profile and record type.
- A Lightning Record Page decides how the page is built from components, such as tabs, the highlights panel, and a related-list component. It is assigned by app, record type, and profile.
A Lightning Record Page that includes the Record Detail component displays the fields from the page layout. Changing the layout changes what appears there. Changing only the Lightning Record Page changes where components sit, but not which fields the detail component contains.
Validation rules and record types
Both areas are in the sidebar, and both change what users can enter.
A validation rule has a formula that returns true when the data is invalid, plus an error message and a location for that message. A rule that evaluates incorrectly can block every save on the object, including saves made by integrations. Test rules in a sandbox first. Remember that data loads and automation also run validation rules.
A record type lets one object serve more than one process. Each record type can offer different picklist values and use a different page layout. Creating a record type does not make it visible to anyone. You must assign it to profiles or permission sets, and you must choose a default.
Creating custom objects
Use the Create menu at the top right of the Object Manager list and choose Custom Object. The form asks for a label, plural label, and API name. It also offers options such as allowing reports, enabling history tracking, and allowing search.
Choose the API name carefully. Salesforce adds __c, and you cannot rename the API name later without the risk of breaking references. Labels are easier to change than API names.
Opening Object Manager pages directly
Every Object Manager page has a Lightning URL. You can bookmark these or open them from the Salesforce CLI.
/lightning/setup/ObjectManager/home
/lightning/setup/ObjectManager/Account/Details/view
/lightning/setup/ObjectManager/Account/FieldsAndRelationships/view
/lightning/setup/ObjectManager/Account/PageLayouts/view
/lightning/setup/ObjectManager/Account/ValidationRules/viewFor standard objects, the API name appears in the URL. Custom objects can show a 15-character ID instead, so copy the URL from your address bar after you open one.
This command opens your default org straight to the Account page layouts:
sf org open --path lightning/setup/ObjectManager/Account/PageLayouts/viewNote that the CLI path has no leading slash, as in the earlier chapter on opening Setup.
Common errors
| Symptom | Likely cause | What to check |
|---|---|---|
| The Object Manager tab is missing | Your user lacks Setup access | Ask an admin to check the **View Setup and Configuration** permission, and **Customize Application** for making changes |
| Object not in the list | The object belongs to an unlicensed feature or is not enabled | Check the feature's enablement and the org's edition |
| Search box finds nothing | You typed a label that differs from the API name | Try the API name |
| New field is invisible | No field-level security or layout assignment | Review both |
| Field cannot be deleted | Something references it | Use **Where is this used?** |
| Save fails with a message you did not expect | A validation rule on the object | Open **Validation Rules** and check which are active |
Exercise
A user says the new "Renewal Date" field you created on Account does not appear on the Account page. You can see it in Fields & Relationships. Name the two Object Manager settings you would check first, and say how you would tell a layout problem from a Lightning Record Page problem.
Show answer
Check field-level security for the user's profile or permission sets, and check whether the field is on the page layout assigned to the user's profile and record type. If the page uses a Record Detail component, the layout controls which fields it shows, so a missing field means a layout or security problem. If the field is on the layout but the page still lacks it, look at the Lightning Record Page in Lightning App Builder to see whether the component that would show it was removed or hidden by a visibility filter.
Exercise
Write the CLI command that opens the Validation Rules page for the Contact object in your default org.
Show answer
sf org open --path lightning/setup/ObjectManager/Contact/ValidationRules/view