Sub topic 1
How Salesforce Stores Data: Objects, Fields, and Records
Prerequisites
Assume you know the Salesforce Setup area and the basic relational-data model. An object is similar to a database table, a field is similar to a column, and a record is similar to a row.
Objects, Fields, and Records
Salesforce stores business data in objects. Each object defines the type of information that can be stored. Fields describe the properties of that information. Records are individual instances of an object.
For example, the Account object can contain fields such as Name, Industry, and Phone. A record might represent Acme Corp. Relationships connect records in different objects, such as a Contact belonging to an Account.
Standard Objects
Standard objects are provided by Salesforce. They include built-in fields, relationships, automation support, and user-interface features.
| Object | Common purpose |
|---|---|
| Account | Companies or other organizations |
| Contact | People associated with accounts |
| Lead | Potential customers not yet qualified |
| Opportunity | Potential sales deals |
| Case | Customer questions or support issues |
Other standard objects include Campaign, Product, Asset, and Contract. Use a standard object when its meaning matches your business process. This gives you features that would otherwise require custom design.
Creating Custom Objects
Create a custom object when your business needs a record type that Salesforce does not provide. In Setup, open Object Manager, select Create, and choose Custom Object. Define its label, plural label, record name field, and sharing settings. Then add custom fields such as currency, date, picklist, or lookup fields.
For example, an Invoice__c object could store invoice number, amount, status, and a link to an Account.
API Names, Labels, and `__c`
A label is the human-readable name shown to users. An API name is the stable name used by SOQL, Apex, and integrations. Custom objects and custom fields normally end in __c.
SELECT Name, Amount__c, Account__r.Name
FROM Invoice__c
WHERE Status__c = 'Open'Here, Invoice__c is a custom object, Amount__c and Status__c are custom fields, and Account__r navigates a relationship. Standard fields and objects usually have names without __c.
Exercise
Which Salesforce object should store a potential customer before the customer is qualified?
Show answer
A Lead record should store the potential customer before qualification.