A Salesforce object is a database table that stores specific types of data in your Salesforce org. Objects contain records (rows) made up of fields (columns) that hold the actual data values. Every piece of information in Salesforce—from accounts and contacts to custom business data—is stored in objects.

What is a Salesforce Object?

In Salesforce, an object represents a specific type of data your organization needs to track. Think of objects as database tables with a user-friendly interface. Each object contains:

  • Records: Individual instances of data (like a specific account or contact)
  • Fields: Data attributes that define what information each record stores
  • Relationships: Connections between different objects
  • Business logic: Validation rules, workflows, and triggers that govern data behavior

Objects form the foundation of your Salesforce data model and determine how users interact with information through the platform’s interface.

Standard Objects in Salesforce

Standard objects are pre-built by Salesforce and come with every org. These objects handle common business processes and cannot be deleted, though you can customize them by adding fields, validation rules, and workflows.

Core Standard Objects

Object Purpose Key Fields
Account Companies, organizations, or individuals Name, Type, Industry, Phone
Contact People associated with accounts First Name, Last Name, Email, Phone
Lead Potential customers not yet qualified Name, Company, Email, Status
Opportunity Potential sales deals Name, Amount, Stage, Close Date
Case Customer service requests or issues Subject, Status, Priority, Origin
Product Items or services your company sells Name, Product Code, Active
User People who can log into Salesforce Name, Email, Profile, Role

Standard objects include built-in functionality like page layouts, record types, and standard reports. They follow Salesforce’s sharing model and integrate seamlessly with platform features like Chatter, approvals, and mobile access.

How to Create Custom Objects in Salesforce

Custom objects store data unique to your business that standard objects cannot accommodate. Follow these steps to create a custom object:

Step-by-Step Creation Process

  1. Navigate to Setup: Click the gear icon → Setup
  2. Find Object Manager: Search for “Object Manager” in Quick Find
  3. Create New Object: Click “Create” → “Custom Object”
  4. Configure Basic Settings:
    • Label: Display name users see (e.g., “Property”)
    • Plural Label: Plural form (e.g., “Properties”)
    • Object Name: API name (auto-generated, e.g., “Property__c”)
    • Record Name: Format for record identification
  5. Set Deployment Status:
    • In Development: Object hidden from users
    • Deployed: Object available to users
  6. Configure Optional Features:
    • Allow Reports: Enable reporting on this object
    • Allow Activities: Enable tasks and events
    • Track Field History: Monitor field changes
    • Allow in Chatter Groups: Enable Chatter integration
    • Allow Bulk API Access: Enable Data Loader compatibility
    • Allow Streaming API Access: Enable real-time data streaming
  7. Save the Object: Click “Save” to create

Post-Creation Configuration

After creating the object, configure additional elements:

  • Custom Fields: Add fields to store specific data types
  • Page Layouts: Control field arrangement and visibility
  • Record Types: Create different versions for different business processes
  • Validation Rules: Enforce data quality requirements
  • Triggers and Workflows: Automate business processes

Salesforce Object Relationship Types

Object relationships define how different objects connect and share data. Understanding these relationships is crucial for effective data modeling.

Master-Detail Relationship

A tight relationship where the detail record cannot exist without its master record. Key characteristics:

  • Detail record inherits security and sharing settings from master
  • Deleting master record deletes all detail records
  • Master record controls detail record ownership
  • Roll-up summary fields can aggregate detail data
  • Maximum 2 master-detail relationships per object

Example: Invoice (master) to Invoice Line Items (detail)

Lookup Relationship

A loose relationship where related records can exist independently. Features include:

  • Child record maintains its own sharing and security
  • Deleting parent record does not affect child records
  • Child record ownership is independent
  • No roll-up summary fields available
  • Maximum 25 lookup relationships per object

Example: Account to Contact (standard lookup)

Many-to-Many Relationship

Created using a junction object with two master-detail relationships. This allows:

  • Multiple records from Object A to relate to multiple records from Object B
  • Junction object stores the relationship data
  • Both parent objects can have roll-up summary fields

Example: Students and Classes connected through Enrollment junction object

Hierarchical Relationship

A special lookup relationship available only on User objects. Allows users to be related to other users in a hierarchy, commonly used for:

  • Manager-employee relationships
  • Organizational reporting structures
  • Role-based data access patterns

Data Loader Requirements for Custom Objects

When an administrator plans to use Data Loader to mass import new records to a custom object from a new API, several configuration steps are required:

Essential Prerequisites

  1. Enable Bulk API Access: Check “Allow Bulk API Access” when creating the custom object or edit existing object settings
  2. Configure Field Accessibility:
    • Ensure target fields are not read-only
    • Verify field-level security permits data loading
    • Check required field validation rules
  3. Set Up External ID Fields (for updates/upserts):
    • Create External ID fields to match records
    • Mark fields as “External ID” and “Unique”
    • Consider case sensitivity requirements
  4. Prepare User Permissions:
    • Grant “API Enabled” permission
    • Provide object-level CRUD permissions
    • Ensure field-level security access
  5. Handle Relationship Fields:
    • Map lookup relationships using External IDs or Salesforce IDs
    • Ensure parent records exist before loading child records
    • Consider relationship field requirements

Data Loader Configuration Steps

  1. Install Data Loader: Download from Setup → Data → Data Loader
  2. Configure Settings:
    • Set batch size (default: 200, max: 10,000)
    • Enable “Use Bulk API” for large datasets
    • Configure timeout settings for long-running operations
  3. Prepare CSV File:
    • Include column headers matching API field names
    • Format data according to field types
    • Handle null values appropriately
  4. Map Fields: Match CSV columns to Salesforce fields during import process
  5. Validate Data: Run a test import with a small sample first

Object Security and Sharing

Salesforce objects inherit the platform’s comprehensive security model:

Organization-Wide Defaults (OWD)

Set the baseline access level for each object:

  • Private: Only record owner and users above in hierarchy can access
  • Public Read Only: All users can view but not edit
  • Public Read/Write: All users can view and edit
  • Controlled by Parent: Detail records inherit master record access (master-detail only)

Permission-Based Access

  • Profiles: Define object-level permissions (Create, Read, Edit, Delete, View All, Modify All)
  • Permission Sets: Grant additional permissions beyond profile settings
  • Field-Level Security: Control access to individual fields

Record-Level Sharing

  • Role Hierarchy: Users inherit access to records owned by subordinates
  • Sharing Rules: Extend access based on record criteria or ownership
  • Manual Sharing: Grant specific users access to individual records
  • Team Access: Account and opportunity teams for collaborative access

Best Practices for Object Design

Planning and Architecture

  • Start with Standard Objects: Use standard objects when possible before creating custom ones
  • Plan Relationships Carefully: Design your data model before building objects
  • Consider Governor Limits: Account for storage limits and relationship constraints
  • Document Your Model: Maintain clear documentation of object purposes and relationships

Performance Optimization

  • Index Strategic Fields: Fields used in WHERE clauses should be indexed
  • Avoid Deep Relationship Queries: Limit relationship depth in SOQL queries
  • Use Selective Queries: Include indexed fields in query filters
  • Monitor Storage Usage: Track data and file storage consumption

Maintenance and Governance

  • Regular Data Cleanup: Archive or delete obsolete records
  • Field Usage Analysis: Remove unused custom fields
  • Security Reviews: Audit object and field permissions regularly
  • Change Management: Test object changes in sandbox environments

Common Object Implementation Scenarios

Sales Process Enhancement

Custom objects commonly extend standard sales functionality:

  • Product Configuration: Store complex product specifications
  • Competitor Tracking: Monitor competitive landscape data
  • Sales Territory Management: Define geographic or industry-based territories

Service Management

Service organizations often require specialized objects:

  • Asset Management: Track customer-owned equipment and warranties
  • Knowledge Base: Store internal procedures and customer-facing articles
  • Service Level Agreements: Define and monitor service commitments

Industry-Specific Requirements

Different industries benefit from tailored object models:

  • Healthcare: Patient records, treatment plans, medical devices
  • Education: Student enrollment, course catalogs, academic records
  • Real Estate: Property listings, showing schedules, market analysis
  • Manufacturing: Bill of materials, production schedules, quality control

Frequently Asked Questions

What is the difference between standard and custom objects in Salesforce?

Standard objects are pre-built by Salesforce (like Account, Contact, Opportunity) and come with every org. They cannot be deleted but can be customized. Custom objects are created by administrators to store data specific to their business needs and can be fully customized or deleted.

How many custom objects can I create in Salesforce?

The number of custom objects depends on your Salesforce edition. Professional Edition allows 50 custom objects, Enterprise and Unlimited editions allow 2,000 custom objects, and Developer Edition allows 400 custom objects.

What permissions do I need to create custom objects?

You need the “Customize Application” permission, which is typically granted to System Administrators. This permission allows you to create and modify custom objects, fields, and other customizations.

Can I delete a custom object after creating it?

Yes, you can delete custom objects, but only if they contain no records and have no dependencies (like lookup relationships, workflow rules, or Apex code references). You must first remove all dependencies before deletion is possible.

What happens to data when I delete a custom object?

When you delete a custom object, all records and data stored in that object are permanently deleted. This action cannot be undone, so always export important data before deletion and test the process in a sandbox environment first.

How do I enable Data Loader access for a custom object?

When creating or editing a custom object, check the “Allow Bulk API Access” option in the object settings. This enables the object to work with Data Loader, Bulk API, and other data integration tools.

What is the maximum number of fields I can add to an object?

You can add up to 500 custom fields per object across all field types. However, there are specific limits for certain field types: 25 lookup relationships, 2 master-detail relationships, and 5 roll-up summary fields per object.

How do object relationships affect data security?

In master-detail relationships, detail records inherit the security and sharing settings of their master records. In lookup relationships, each object maintains its own security settings independently. This affects who can view, edit, and delete related records.