Basics
Fields, Relationships and Record Types in Salesforce
The building blocks of your Salesforce data model.
- Reading time
- 3 min
- Published
- Updated
What a good data model gives you
Data modeling determines how information is stored, linked and displayed. If you get the data model right when you set up Salesforce, users find what they need faster, reporting gets easier and maintenance stays simple. Think of it as the floor plan of your house: when it's right, everything fits together.
Fields are the rooms, relationships are the doors between rooms, and record types are the interior styles of a room. Together they determine how comfortably you live (and work) in Salesforce.
Fields
Fields store data within an object. You have standard fields that Salesforce created for you and custom fields you add yourself for your own processes.
Standard and custom fields
- Standard fields come with the Salesforce objects. Examples: Name, Created Date, Owner.
- Custom fields are the ones you add yourself when you want to capture extra information, like ContractType__c or ProjectPhase__c.
Common field types
- Text, number, currency and percent for basic data. Use Currency for amounts (with the currency settings) and Percent for ratios like win probability.
- Date and date/time for deadlines, start and end dates, or moments when something happens.
- Picklist and multi-select picklist limit choices to a fixed list so data stays clean. Only use multi-select when there's no other way.
- Checkbox for a yes/no question, handy for simple statuses like "NDA received?".
- Email, phone and URL check that the input is valid, and you can click them in Salesforce to send an email, call or open the site.
- Formula field calculates values automatically from other fields. For example Expected Revenue = Amount × Win Probability.
With validation rules you guard data quality: if a value is missing or invalid, the user sees a clear error message. You don't need to write code; you set conditions and a message for the user.
Relationships
Relationships link records together. This builds context: which contacts belong to which account, which opportunities belong to which project, and so on.
Lookup or master-detail
Lookup relationship
Think of it as neighbors: they know each other, but are independent. Delete the parent record, and the child record usually still exists.
Master-detail relationship
Think of it as parent-child: the child cannot exist without the parent. Delete the parent, and the children are deleted too. Permissions and ownership flow down from the parent.
Junction objects (many-to-many)
Sometimes you want to link records in a many-to-many relationship. You do this with a junction object: an extra object with two Master-Detail (or Lookup) relationships. Example: a Training can belong to multiple Accounts and an Account can have multiple Trainings. The junction object AccountTraining__c captures the link.
Roll-up summary fields
With roll-up summary fields you count, sum, or determine minimum/maximum of child records on the parent. This only works by default with Master-Detail. Examples: Number of Cases on an Account, or Total project hours on a Project.
Record types
With record types you can support different processes within one object. Each record type can have its own picklist values, page layouts, and business logic.
- Different processes, one object. Use record types when you have clear variants within the same object. That way you avoid creating more custom objects than you need.
- Page layouts per audience. Show a different layout per record type. Sales sees only the fields that matter to them, and service sees different information.
Real-world examples
- B2C and B2B leads. Use two record types on Lead. For B2B, show fields like Company and Number of Employees; for B2C, consumer fields like Date of Birth and Preferred Channel.
- Contract variants. One Contract object with the record types Subscription, Project and Support, each with its own picklist values and layout.
Tips for structure and scalability
1. Consistent naming
Use clear, complete names. For API names: Project_StartDate__c instead of PrjStrt__c. This makes reporting and maintenance easier.
2. Only add new fields when needed
Prevent field sprawl. Reuse existing fields and picklists. Document choices in a brief design document.
3. Document and manage
Write a description with purpose and owner for objects and fields. That helps with functional management and audits, and AI features use that context too.
A data model that grows with you
With well-chosen fields, the right relationships and record types where you need them, you build a Salesforce data model that grows with your organization. You notice it in cleaner data, simpler management and reports you can trust.
Want to structure your data model for scale?
We help you structure fields, relationships and record types so your Salesforce environment grows without complexity.
Schedule a data model session