📖 Read · 20 XP
Standard vs custom objects and field types
Objects and fields
If you've used a relational database, you already understand most of this:
| Database | Salesforce |
|---|---|
| Table | Object (sObject) |
| Column | Field |
| Row | Record |
| Primary key | Id (15/18-character string) |
| Foreign key | Lookup / Master-Detail field |
Standard vs custom
- Standard objects ship with Salesforce:
Account,Contact,Opportunity,Case,Lead,User… - Custom objects are yours, and their API names end in
__c:Quest__c,Invoice__c. - Custom fields also end in
__c, even when they sit on standard objects:Account.Region__c.
Every object gets some system fields for free: Id, Name, OwnerId, CreatedDate, CreatedById, LastModifiedDate, SystemModstamp.
Common field types
| Type | Use it for |
|---|---|
| Text / Text Area / Long Text | Strings |
| Number, Currency, Percent | Numbers (set precision and scale) |
| Checkbox | Booleans |
| Date, Date/Time | Dates |
| Picklist / Multi-select Picklist | Fixed lists of values |
| Email, Phone, URL | Validated strings |
| Formula | Calculated, read-only values |
| Lookup / Master-Detail | Relationships |
IDs are smart
A record Id like 001g500000mTAOXAA4 starts with a key prefix that tells you the object: 001 is Account, 003 is Contact, 006 is Opportunity. The 15-character version is case-sensitive; the 18-character version adds a checksum so it's case-insensitive and safe in spreadsheets.
🦝 Quill can identify any standard object from its first three characters. He's fun at parties.