How to Create a Custom Object in Salesforce: A Step-by-Step Guide
Creating a custom object in Salesforce allows you to store information that doesn’t fit naturally into Salesforce’s standard objects such as Accounts, Contacts, Leads, or Opportunities.
For example, you might create a Project object to track customer projects, or a Service Request object to manage internal requests.
1. Open Object Manager
- Log in to Salesforce.
- Click the Setup gear icon in the upper-right corner.
- Select Setup.
- In the Quick Find box, type Object Manager.
- Click Object Manager.
2. Create the Custom Object
- Click Create in the upper-right corner.
- Select Custom Object.
- Enter the basic information for your object.
For example:
Salesforce automatically generates the API name, such as Project__c.
Record Name
The Record Name is the primary identifier for each record.
You can choose:
- Text — Users enter a name manually.
- Auto Number — Salesforce automatically generates a number.
For example:
Project-00001
Project-00002
Project-00003
3. Configure Optional Settings
Salesforce provides several additional settings when creating the object.
Depending on your requirements, you may enable:
- Allow Reports — Allows the object to be used in Salesforce reports.
- Allow Activities — Allows Tasks and Events to be associated with records.
- Track Field History — Tracks changes to selected fields.
- Allow Search — Makes records searchable.
- Allow in Chatter Groups — Allows the object to be used with Chatter.
For most business objects, Allow Reports is particularly useful.
4. Save the Object
Click Save.
Your custom object is now available in Salesforce.
You’ll see its details in Object Manager, including:
- Fields & Relationships
- Page Layouts
- Record Types
- Validation Rules
- Lightning Record Pages
- Buttons, Links, and Actions
- List Views
- Apex Triggers
- Flow-related configuration
5. Create Custom Fields
Your new object will probably need additional fields.
From Object Manager → Your Object → Fields & Relationships, click New.
Salesforce gives you numerous field types, including:
- Text
- Number
- Currency
- Date
- Date/Time
- Checkbox
- Picklist
- Multi-Select Picklist
- Lookup Relationship
- Master-Detail Relationship
- Formula
- Roll-Up Summary
For example, a Project object might contain:
6. Create Relationships
Relationships allow your custom object to connect to other Salesforce records.
For example, you could create an Account lookup on the Project object.
Go to:
Object Manager → Project → Fields & Relationships → New → Lookup Relationship
Select Account as the related object.
Now a Project can be associated with an Account.
Lookup vs. Master-Detail
Lookup Relationship
- More loosely connected records
- Parent and child have more independent behavior
- Useful for many general relationships
Master-Detail Relationship
- Tighter relationship
- Child record depends on the parent
- Supports roll-up summary fields
- Security and ownership can be inherited from the parent
Choose Master-Detail when the child record truly belongs to the parent and shouldn’t exist independently.
7. Configure the Page Layout
Go to:
Object Manager → Project → Page Layouts
Open the appropriate layout and drag your fields onto the page.
You can organize fields into sections such as:
Project Information
- Project Name
- Account
- Project Manager
- Status
Dates
- Start Date
- End Date
Financial Information
- Budget
Save the layout when finished.
8. Configure Object Permissions
Creating the object doesn’t automatically mean every user should have access to it.
Go to:
Setup → Profiles or Permission Sets
Then configure permissions for the custom object:
- Read
- Create
- Edit
- Delete
- View All
- Modify All
Permission Sets are generally preferable for granting additional access without modifying a user’s profile.
9. Configure Sharing
Go to:
Setup → Sharing Settings
Find your custom object and configure its organization-wide default (OWD).
For example:
Project — Private
This means users won’t automatically see every Project record.
You can then use:
- Role hierarchy
- Sharing rules
- Teams
- Manual sharing
- Apex managed sharing
to provide additional access.
10. Add the Object to the Navigation
To make the object easy for users to access:
- Go to Setup → App Manager.
- Find the Lightning app you want to modify.
- Click the dropdown arrow.
- Select Edit.
- Select Navigation Items.
- Add your custom object.
- Save.
Users can now access the object directly from the app’s navigation bar.
11. Test the Object
Before releasing it to users, test the entire experience.
Create several test records and verify:
- Fields work correctly.
- Relationships work correctly.
- Users have the appropriate permissions.
- Reports can access the object.
- List views work.
- Record pages display correctly.
- Sharing behaves as expected.
- Automation works if you’ve added Flow or Apex.
Example
Suppose you’re building a Salesforce system for a consulting company.
You could create:
Custom Object: Project__c
with:
- Project Name
- Account
- Project Manager
- Status
- Start Date
- End Date
- Budget
- Project Type
Then create a lookup relationship:
Project → Account
Your resulting data model might look like:
Account
↓
Projects
↓
Project Tasks
This gives Salesforce a structured way to manage information that isn’t covered by the standard objects.
Quick Summary
Setup → Object Manager → Create → Custom Object → Configure fields → Create relationships → Configure page layout → Set permissions → Configure sharing → Add to app → Test
That’s the basic process for creating a production-ready custom object in Salesforce.