Objects:
In Salesforce, objects are the fundamental units of data. There are two main types of objects: standard objects and custom objects.
- Standard Objects:
- Salesforce comes with predefined standard objects like Account, Contact, Opportunity, etc.
- Example: The “Account” object represents a company or organization.
- Custom Objects:
- You can also create custom objects tailored to your specific business needs.
- Example: You might create a custom object named “Project” to track information about different projects.
Objects:
Object | Description | Example |
---|---|---|
Account | Represents a company or organization. | ABC Corp |
Contact | Represents an individual associated with an Account. | John Doe |
Opportunity | Represents potential revenue from a sale. | Sales Deal 2022 |
Custom_Object | Custom object created to fit specific business needs. | Project |
Fields:
Fields are where you store data in an object. They can be of different types, such as text, number, date, etc.
- Standard Fields:
- Standard objects come with pre-built standard fields.
- Example: The “Account” object may have standard fields like “Account Name,” “Industry,” etc.
- Custom Fields:
- You can add custom fields to both standard and custom objects.
- Example: Adding a custom field like “Project Manager” to the “Project” object.
Fields:
Field | Type | Description | Example |
---|---|---|---|
Account Name | Text | Name of the company or organization. | ABC Corp |
Industry | Picklist | Type of industry the account belongs to. | Technology |
Annual Revenue | Currency | Financial performance of the account. | $1,000,000 |
Contact Role | Text | Role of the contact in the organization. | Manager |
Opportunity Name | Text | Name of the sales opportunity. | Sales Deal 2022 |
Amount | Currency | Estimated revenue from the opportunity. | $50,000 |
Project Manager | Lookup | Links a project to a specific manager. | Jane Smith (Contact) |
Task Description | Text | Description of a task in a project. | Complete project plan |
Relationships:
Relationship | Description | Example |
---|---|---|
Contact to Account (Lookup) | Associates a Contact with an Account, allowing you to link individuals to companies. | John Doe (Contact) linked to ABC Corp (Account) |
Opportunity to Account (Lookup) | Connects an Opportunity with an Account, indicating the potential revenue source. | Sales Deal 2022 (Opportunity) linked to ABC Corp (Account) |
Project to Task (Master-Detail) | Creates a hierarchical relationship where Tasks are dependent on the associated Project. | Task “Complete project plan” (Detail) associated with Project (Master) |
Related Records:
Related records allow you to establish connections between different objects. There are two main types: Lookup Relationships and Master-Detail Relationships.
- Lookup Relationship:
- Allows you to associate one record with another, creating a link.
- Example: On the “Opportunity” object, you might have a lookup relationship with the “Account” object, connecting each opportunity with an account.
- Master-Detail Relationship:
- A stricter form of relationship where the “detail” object is a child to the “master” object.
- Example: You could have a master-detail relationship between “Project” (master) and “Task” (detail), ensuring that tasks are linked to specific projects.
Related List:
Related lists display records related to a particular record. They are present on the detail page of a record.
- Standard Related Lists:
- Standard objects come with predefined related lists.
- Example: The “Account” detail page might display a related list of “Contacts.”
- Custom Related Lists:
- You can also create custom related lists for custom objects.
- Example: A custom object “Event” might have a related list of “Attendees.”
Related Lists:Related ListDescriptionExampleContacts on AccountDisplays a list of Contacts associated with an Account.John Doe, Jane SmithOpportunities on AccountShows a list of Opportunities linked to an Account.Sales Deal 2022Tasks on ProjectLists tasks associated with a specific Project.Complete project plan
Example Scenario:
Let’s say you have an “Account” object and a “Contact” object with a lookup relationship between them. Each account can have multiple contacts.
- Account Object Fields:
- Account Name (Standard)
- Industry (Standard)
- Annual Revenue (Standard)
- Custom Field: Account Manager
- Contact Object Fields:
- First Name (Standard)
- Last Name (Standard)
- Email (Standard)
- Custom Field: Role
- Relationship:
- Lookup relationship from Contact to Account
- Related List:
- Account detail page would display a related list of Contacts.
This is a basic overview, and Salesforce can be quite extensive. Visualizing relationships through diagrams in the Salesforce Schema Builder can help you understand the structure better.
Real-Time Scenario:
Let’s say you are managing sales activities for ABC Corp.
- Account Page:
- You create an Account named “ABC Corp” with the industry set to “Technology” and an annual revenue of $1,000,000.
- Contacts on Account Related List:
- In the Contacts related list on the Account page, you add John Doe as a contact with the role of “Manager” and Jane Smith as another contact.
- Opportunities:
- You create a new Opportunity named “Sales Deal 2022” linked to the “ABC Corp” account with an estimated revenue of $50,000.
- Project:
- You create a custom object named “Project” and associate it with the “Account” object. Each project has a project manager, and you link Jane Smith as the project manager for a project.
- Tasks on Project Related List:
- In the related list on the Project detail page, you add a task with the description “Complete project plan.”
Now Lets talk about one of the important topics -> record types in salesforce
Record Types in Salesforce are a powerful feature that allows you to define different sets of picklist values, page layouts, and business processes for different users or scenarios within a single object. This helps tailor the user interface and behavior of Salesforce records to specific business needs.
Here are key aspects of Record Types:
1. Definition:
- A Record Type is a way to categorize records of the same object based on certain criteria.
- It allows you to define different picklist values, page layouts, and business processes for each record type.
2. Use Cases:
- Different Business Processes: When different teams or departments have distinct processes for handling records of the same object. For example, Sales and Support might have different processes for managing opportunities.
- Customized User Experience: To provide a tailored user experience for different user profiles or roles within the same object.
3. Components of Record Types:
- Picklist Values: Each record type can have its own set of picklist values for certain fields.
- Page Layouts: You can create different page layouts for different record types, controlling which fields are visible, required, or read-only.
- Business Processes: You can associate different business processes with each record type, defining the stages a record can go through.
4. Creation:
- To create a Record Type, go to the Object Manager, select the object, and navigate to “Record Types.”
- Create a new record type, define its picklist values, associate page layouts, and choose a business process if applicable.
5. Assignment:
- Assign Record Types to profiles or users to determine who can use each record type.
- You can also use the “Record Type Selection” page layout to allow users to choose the record type when creating a new record.
6. Visibility Rules:
- You can set up visibility rules to control when a record type is available based on certain criteria, like the profile of the user or the values of other fields.
7. Page Layouts and Business Processes:
- Different record types can have different page layouts, showing or hiding fields as needed.
- You can associate specific business processes with each record type, guiding users through a set of predefined stages.
8. Example:
- Consider an “Opportunity” object where the sales team and the consulting team have different processes and information they need to capture. You can create two record types: “Sales Opportunity” and “Consulting Opportunity.” Each can have its own picklist values, page layouts, and business processes.
9. Benefits:
- Customization: Tailor the Salesforce experience based on different user roles or business scenarios.
- Efficiency: Streamline data entry and guide users through specific processes.
- Clarity: Make it easier for users to understand and work with records in accordance with their responsibilities.
Record Types are a flexible tool that empowers administrators to create a more customized and efficient Salesforce environment, catering to the diverse needs of different users and teams.