Salesforce Admin Notes
What is
cloud computing
Cloud computing is a technology that allows you to
access and store data and applications over the internet instead of on your
local computer or server. It provides on-demand availability of computing
resources, such as servers, storage, databases, networking, software, and more,
without the need for direct active management by the user.
Key
Characteristics of Cloud Computing:
- On-Demand Self-Service: Users can provision computing resources as
needed without human intervention.
- Broad Network Access: Resources are available over the network and
accessed through standard mechanisms.
- Resource Pooling: Computing resources are pooled to serve multiple users, with
different physical and virtual resources dynamically assigned and
reassigned according to demand.
- Rapid Elasticity: Resources can be quickly scaled up or down to meet demand.
- Measured Service: Resource usage is monitored, controlled, and reported, providing
transparency for both the provider and consumer.
Types
of Cloud Services:
- Infrastructure as a Service (IaaS): Provides virtualized computing resources over
the internet. Examples include Amazon Web Services (AWS) EC2 and Microsoft
Azure.
- Platform as a Service (PaaS): Provides a platform allowing customers to
develop, run, and manage applications without dealing with the underlying
infrastructure. Examples include Google App Engine and Microsoft Azure App
Services.
- Software as a Service (SaaS): Delivers software applications over the
internet, on a subscription basis. Examples include Google Workspace,
Microsoft Office 365, and Salesforce.
Benefits
of Cloud Computing:
- Cost Efficiency: Reduces the need for physical hardware and maintenance.
- Scalability:
Easily scales resources up or down based on demand.
- Accessibility: Access data and applications from anywhere with an internet
connection.
- Reliability:
Offers robust disaster recovery and backup solutions.
- Collaboration: Enhances collaboration by allowing multiple users to work on the
same project simultaneously.
Salesforce which types
of cloud
Salesforce is
primarily a Software
as a Service (SaaS) provider. It offers a suite of cloud-based
applications for customer relationship management (CRM), which includes sales,
service, marketing, and more. Salesforce also provides Platform as a
Service (PaaS) through its Salesforce Platform (formerly known
as Force.com), which allows developers to build and deploy custom applications.
In summary:
·
SaaS: Salesforce offers ready-to-use applications for CRM and other
business processes.
·
PaaS: Salesforce provides a platform for developers to create custom
applications.
This
combination allows businesses to leverage Salesforce's powerful tools and
infrastructure while also building custom solutions tailored to their specific
needs.
Multi-Tenant Architecture
Multi-tenant architecture is a software architecture where a single instance of a software application serves multiple customers, known as tenants. Each tenant's data is isolated and remains invisible to other tenants. This architecture is commonly used in cloud computing to maximize resource utilization and efficiency.
Key Features of Multi-Tenant Architecture:
1.
Resource Sharing: Multiple tenants share the same infrastructure and resources,
such as servers, databases, and applications.
2.
Data Isolation: Each tenant's data is isolated and secure, ensuring privacy and
security.
3.
Scalability: The architecture can easily scale to accommodate more tenants
without significant changes to the underlying infrastructure.
4.
Cost Efficiency: Shared resources reduce costs for both the provider and the
tenants.
5. Customization: Tenants can customize their experience without affecting others.
Salesforce and Multi-Tenant Architecture
Yes, Salesforce uses a multi-tenant architecture. This means that multiple customers (tenants) share the same instance of Salesforce, but their data is kept separate and secure. Salesforce's multi-tenant architecture allows it to provide a highly scalable, reliable, and cost-effective service to its customers.
Benefits of Salesforce's Multi-Tenant Architecture:
·
Efficiency: Shared resources lead to better utilization and lower costs.
·
Security: Robust data isolation ensures that each tenant's data is secure
and private.
·
Scalability: Salesforce can easily scale to accommodate more users and data.
·
Continuous Updates: Salesforce can roll out updates and new features to all tenants
simultaneously without downtime.
Salesforce's
multi-tenant architecture is a key factor in its ability to deliver a powerful
and flexible platform to a wide range of customers.
Editions of salesforce
Sales Cloud Editions
1.
Essentials: Designed for small businesses, it includes basic sales and
customer support features.
2.
Professional: Offers a complete CRM solution for any size team, with no limits
on the number of users.
3.
Enterprise: Provides advanced customization and integration capabilities for
larger businesses.
4. Unlimited: Includes all Enterprise features plus additional support and configuration options.
Service Cloud Editions
1.
Essentials: Basic customer service and support features for small
businesses.
2.
Professional: Comprehensive service solution for teams of any size.
3.
Enterprise: Advanced service features with extensive customization and
integration options.
4. Unlimited: All Enterprise features plus additional support and configuration options.
Marketing Cloud Editions
1.
Basic: Entry-level edition with essential marketing tools.
2.
Pro: More advanced features for growing marketing teams.
3.
Corporate: Comprehensive marketing solution for larger teams.
4. Enterprise: Full suite of marketing tools for large enterprises.
Other Editions
1.
Pardot: Marketing automation solution with different editions like
Growth, Plus, Advanced, and Premium.
2.
Commerce Cloud: Editions tailored for B2B and B2C commerce needs.
3.
Community Cloud: Editions for creating branded communities and portals.
4.
Analytics Cloud: Editions powered by Tableau for advanced analytics and business
intelligence.
Each edition
offers different features and capabilities, allowing businesses to choose the
one that best fits their needs and budget.
Salesforce
Releases
Click here to read about salesforce release process
What is the clouds
salesforce have at present
Salesforce
offers a wide range of cloud services tailored to different business needs.
Here are some of the key clouds provided by Salesforce:
1.
Sales Cloud: Focuses on sales automation, helping businesses manage leads,
opportunities, and sales processes.
2.
Service Cloud: Provides tools for customer service and support, including case
management, knowledge base, and customer service automation.
3.
Marketing Cloud: Offers solutions for digital marketing, including email
marketing, social media marketing, and customer journey management.
4.
Commerce Cloud: Supports e-commerce businesses with tools for managing online
stores, product catalogs, and customer orders.
5.
Experience Cloud: Enables the creation of branded communities, portals, and
websites for customers, partners, and employees.
6.
Analytics Cloud: Provides advanced analytics and business intelligence tools,
including Salesforce's Tableau.
7.
Integration Cloud: Powered by MuleSoft, it helps integrate various applications,
data, and devices.
8.
Health Cloud: Designed for healthcare organizations to manage patient
relationships and care coordination.
9.
Financial Services Cloud: Tailored for financial
institutions to manage client relationships and financial services.
10. Nonprofit
Cloud:
Provides tools for nonprofit organizations to manage fundraising, donor
relationships, and program management.
11. Education
Cloud:
Supports educational institutions in managing student relationships,
recruitment, and alumni engagement.
12. Manufacturing
Cloud:
Helps manufacturing companies manage their operations, sales, and customer
relationships.
13. Government
Cloud:
Provides solutions for government agencies to manage their operations and
engage with citizens.
14. Net Zero
Cloud:
Focuses on sustainability management, helping organizations track and reduce
their carbon footprint.
15. Data Cloud: Unlocks and
unifies data across the organization to create a single source of truth
We will discuss mainly two clouds in this article those are sales and service clouds
Sales Cloud
Sales Cloud
is designed to help businesses manage their sales processes and customer
relationships. Here are some key features:
1.
Lead Management: Track and manage potential customers from initial contact
through to conversion.
2.
Opportunity Management: Manage sales opportunities,
track progress, and forecast sales.
3.
Contact Management: Store and manage customer contact information, including
communication history and social media insights.
4.
Sales Collaboration: Collaborate with team members using tools like Chatter to share
information and insights.
5.
Sales Performance Management: Set sales
targets, track performance, and provide coaching to sales reps.
6.
Reports and Dashboards: Create customizable reports and
dashboards to gain insights into sales performance and trends.
7. Mobile Access: Access Sales Cloud features on the go with the Salesforce mobile app.
Service Cloud
Service Cloud is focused on customer service and support, providing tools to help businesses
deliver exceptional customer experiences. Here are some key features:
1.
Case Management: Track and manage customer service cases from creation to
resolution.
2.
Knowledge Base: Create and manage a repository of articles and FAQs to help
customers find answers quickly.
3.
Omni-Channel Routing: Automatically route cases to the right agents based on their
skills and availability.
4.
Service Console: A unified interface for agents to manage cases, access customer
information, and collaborate with team members.
5.
Field Service: Manage field service operations, including scheduling,
dispatching, and tracking field technicians.
6.
Customer Self-Service: Provide customers with
self-service options through portals and communities.
7.
Reports and Dashboards: Create customizable reports and
dashboards to gain insights into service performance and customer satisfaction.
Both Sales
Cloud and Service Cloud are powerful tools that help businesses streamline
their operations, improve customer relationships, and drive growth.
Salesforce Order of Execution
Click here to learn the order of Execution in Salesforce
Objects
In Salesforce, an object
is a database table that allows you to store data specific to your
organization. Objects are fundamental components in Salesforce and are used to
manage and organize data.
Types of objects:
Standard Objects
These are
pre-defined objects provided by Salesforce. They cover common business entities
and processes. Examples include:
·
Account: Represents an individual account, which is an organization or
person involved with your business.
·
Contact: Represents an individual associated with an account.
·
Opportunity: Represents a potential revenue-generating event, such as a sales
deal.
·
Lead: Represents a prospect or potential opportunity.
· Case: Represents a customer issue or problem.
Custom Objects
These are objects that you create to store information specific to your business needs. Custom objects allow you to extend Salesforce's functionality to fit your unique requirements. For example, you might create a custom object to track project details or employee information.
Big Objects
Big Objects are designed to store and manage massive amounts of data on the Salesforce platform. They can handle billions of records and are optimized for performance. Big Objects are used for historical data, audit logs, and other large datasets.
External Objects
External Objects are used to integrate data from external systems into Salesforce. They are similar to custom objects but map to data stored outside of Salesforce. External Objects are typically used with Salesforce Connect to access data in external systems without importing it into Salesforce.
Platform Events
Platform Events are used to deliver secure and scalable custom notifications within Salesforce or from external sources. They are part of the Salesforce Enterprise Messaging Platform and are used for event-driven architecture.
Custom Metadata Types
Custom Metadata Types are similar to custom objects but are used to define application metadata. They allow you to create, update, and manage metadata records declaratively and programmatically.
Standard Objects in Salesforce Sales Cloud
1.
Account: Represents an individual account, which is an organization or
person involved with your business (such as customers, competitors, and
partners).
2.
Contact: Represents an individual associated with an account.
3.
Opportunity: Represents a potential revenue-generating event, such as a sales
deal.
4.
Lead: Represents a prospect or potential opportunity.
5.
Campaign: Represents a marketing campaign that you want to plan, manage,
and track.
6.
Case: Represents a customer issue or problem.
7.
Task: Represents a to-do item or action.
8.
Event: Represents a calendar event.
9.
Product: Represents a product that your company sells.
10. Price Book: Represents
a list of products and their associated prices.
11. Quote: Represents
a quote for a potential sale.
12. Order: Represents
an order for products or services.
13. Asset: Represents an item of commercial value, such as a product sold by the company or a competitor that a customer has purchased and installed.
1.
Case: Represents a customer issue or problem.
2.
Contact: Represents an individual associated with an account.
3.
Account: Represents an individual account, which is an organization or
person involved with your business.
4.
Knowledge: Represents a knowledge article that can be used to solve cases.
5.
Service Contract: Represents a contract that defines the terms of service for a
customer.
6.
Entitlement: Represents a customer's right to receive support.
7.
Work Order: Represents a task or job for a customer.
8.
Work Order Line Item: Represents a specific task or job within a work order.
9.
Solution: Represents a solution to a customer issue.
10. Task: Represents
a to-do item or action.
11. Event: Represents
a calendar event.
How to create
custom object in salesforce
Steps
to Create a Custom Object
1.
Navigate to Setup:
o
Log in to Salesforce and click on the gear icon in the top right
corner.
o
Select "Setup" from the dropdown menu.
2.
Go to Object Manager:
o
In the Setup menu, type "Object Manager" in the Quick
Find box and select "Object Manager."
3.
Create a New Custom Object:
o
Click on the "Create" button and select "Custom
Object."
4.
Define the Custom Object:
o
Fill in the required fields for your custom object:
§ Label: The name of
the object as it will appear in the user interface.
§ Plural Label: The plural
form of the object name.
§ Object Name: The API
name for the object (automatically populated based on the label).
§ Record Name: The name
field for the records of this object (e.g., "Name" or "Auto
Number").
§ Data Type: Choose the
data type for the record name (Text or Auto Number).
§ Optional
Features: Select optional features like allowing reports, activities,
track field history, etc.
5.
Save the Custom Object:
o
Click the "Save" button to create the custom object.
6.
Add Custom Fields:
o
After creating the custom object, you can add custom fields to it.
Click on the "Fields & Relationships" tab and then click
"New" to add fields.
7.
Set Field-Level Security:
o
Define the field-level security for each field to control which
profiles can view or edit the field.
8.
Add to Page Layouts:
o Customize the page layouts to include the new fields and arrange them as needed.
Example
Let's say you
want to create a custom object called "Project" to track project
details. You would follow the steps above and define the object with fields
like "Project Name," "Start Date," "End Date,"
and "Status."
By following
these steps, you can create custom objects tailored to your specific business
needs in Salesforce.
Object Manager
Object Manager in Salesforce is a powerful tool that allows you to manage both standard and custom objects within your Salesforce organization. It provides a centralized interface to create, customize, and manage objects and their fields, relationships, and settings.
Key Features of Object Manager:
1.
Create and Customize Objects: You can
create new custom objects and customize existing standard objects to fit your
business needs.
2.
Manage Fields: Add, edit, and delete fields for your objects. You can also set
field-level security and validation rules.
3.
Relationships: Define relationships between objects, such as lookup and
master-detail relationships.
4.
Page Layouts: Customize the layout of your object records, including which
fields are displayed and their arrangement.
5.
Record Types: Create and manage record types to offer different business
processes, picklist values, and page layouts to different users.
6.
Validation Rules: Define rules to ensure data integrity by specifying criteria
that must be met before a record can be saved.
7. Triggers and Workflows: Set up triggers and workflows to automate business processes based on specific criteria.
How to Access Object Manager:
1.
Navigate to Setup:
o
Log in to Salesforce and click on the gear icon in the top right
corner.
o
Select "Setup" from the dropdown menu.
2.
Go to Object Manager:
o
In the Setup menu, type "Object Manager" in the Quick
Find box and select "Object Manager."
3.
Select an Object:
o
In the Object Manager, you can see a list of all standard and
custom objects. Click on the object you want to manage.
Object
Manager is an essential tool for Salesforce administrators and developers,
providing the flexibility to tailor Salesforce to meet specific business
requirements.
Fields
In Salesforce, you can create various types of fields for both standard and custom objects to store different kinds of data. Here are the types of fields you can create:
Standard Fields
Standard
objects come with predefined fields that you cannot delete but can customize to
some extent. Examples include:
·
Account Name: The name of the account.
·
Contact Name: The name of the contact.
·
Opportunity Amount: The amount of the opportunity.
· Case Number: The unique identifier for a case.
Custom fields
Custom fields can be added to both standard and custom objects to store additional
information specific to your business needs. Here are the types of custom
fields you can create:
1.
Text Fields:
o
Text: Stores alphanumeric characters up to 255 characters.
o
Text Area: Stores alphanumeric characters up to 255 characters.
o
Text Area (Long): Stores alphanumeric characters up to 131,072 characters.
o
Text Area (Rich): Stores formatted text, including images and links, up to 131,072
characters.
o
Text (Encrypted): Stores encrypted text up to 175 characters.
2.
Numeric Fields:
o
Number: Stores numeric values.
o
Currency: Stores currency values.
o
Percent: Stores percentage values.
3.
Date/Time Fields:
o
Date: Stores date values.
o
Date/Time: Stores date and time values.
4.
Picklist Fields:
o
Picklist: Stores a single value from a predefined list of values.
o
Multi-Select Picklist: Stores multiple values from a
predefined list of values.
5.
Checkbox:
o
Stores a Boolean value (true/false).
6.
Formula Fields:
o
Formula: Stores a value calculated based on a formula.
7.
Lookup Relationship:
o
Creates a relationship between two objects.
8.
Master-Detail Relationship:
o
Creates a parent-child relationship between two objects.
9.
Geolocation:
o
Stores latitude and longitude values.
10. Email:
o
Stores email addresses.
11. Phone:
o
Stores phone numbers.
12. URL:
o
Stores website URLs.
These field
types allow you to capture and store a wide range of data in Salesforce, making
it a flexible and powerful platform for managing your business information.
How to create
a Field in salesforce
Creating a field in Salesforce is a straightforward process. Here are the steps to create a custom field for an object:
Steps to Create a Custom Field
1.
Navigate to Setup:
o
Log in to Salesforce and click on the gear icon in the top right
corner.
o
Select "Setup" from the dropdown menu.
2.
Go to Object Manager:
o
In the Setup menu, type "Object Manager" in the Quick
Find box and select "Object Manager."
3.
Select the Object:
o
In the Object Manager, find and click on the object you want to
add the field to (e.g., Account, Contact, or a custom object).
4.
Go to Fields & Relationships:
o
Click on the "Fields & Relationships" tab.
5.
Create a New Field:
o
Click the "New" button to create a new field.
6.
Choose Field Type:
o
Select the type of field you want to create (e.g., Text, Number,
Date, Picklist, etc.) and click "Next."
7.
Enter Field Details:
o
Fill in the required details for the field, such as Field Label,
Field Name, and any additional settings specific to the field type. Click
"Next."
8.
Set Field-Level Security:
o
Define the field-level security to control which profiles can view
or edit the field. Click "Next."
9.
Add to Page Layouts:
o Choose the page layouts where the field should be added. Click "Save."
Example
Let's say you
want to create a custom field called "Project Start Date" for the
Account object. You would follow the steps above and choose the
"Date" field type, then enter "Project Start Date" as the
Field Label and set the necessary field-level security and page layout options.
By following
these steps, you can create custom fields tailored to your specific business
needs in Salesforce.
Object
limitations in salesforce
Salesforce has certain limitations for objects to ensure optimal performance and maintain system integrity. Here are some key limitations:
Custom Objects
1.
Number of Custom Objects:
o
Enterprise Edition: Up to 200 custom objects.
o
Unlimited Edition: Up to 2,000 custom objects.
o
Developer Edition: Up to 400 custom objects.
2.
Fields per Object:
o
Enterprise Edition: Up to 500 fields per object.
o
Unlimited Edition: Up to 800 fields per object.
o
Developer Edition: Up to 500 fields per object.
3.
Relationships:
o
Lookup Relationships: Up to 40 per object.
o
Master-Detail Relationships: Up to 2 per object.
4.
Record Limits:
o
Big Objects: Can handle billions of records.
o Standard and Custom Objects: Limited by storage capacity.
Standard Objects
1.
Fields per Object:
o
Similar to custom objects, standard objects also have field
limits, typically up to 500 fields per object in Enterprise Edition.
2.
Relationships:
o Standard objects can have lookup and master-detail relationships, but the limits are the same as for custom objects.
General Limitations
1.
Storage Limits:
o
Data Storage: Varies by edition and number of users. For example, Enterprise
Edition provides 10 GB of data storage plus 20 MB per user.
o
File Storage: Varies by edition and number of users. For example, Enterprise
Edition provides 10 GB of file storage plus 2 GB per user.
2.
API Limits:
o
API call limits vary by edition and are based on the number of
user licenses. For example, Enterprise Edition allows up to 100,000 API calls
per 24-hour period.
3.
Governor Limits:
o
Salesforce enforces various governor limits to ensure efficient
use of resources, such as limits on the number of SOQL queries, DML statements,
and CPU time.
These
limitations are designed to ensure that Salesforce remains performant and
scalable for all users. It's important to be aware of these limits when
designing and implementing your Salesforce solutions.
Tabs
In
Salesforce, a tab
is a user interface element that allows users to access different objects,
records, and features within the Salesforce application. Tabs are a key part of
the Salesforce navigation experience and help users quickly find and interact
with the data they need.
Types of Tabs in salesforce
1.
Custom Object Tabs:
o
These tabs provide access to custom objects that you create. When
you create a custom object, you can also create a custom tab to make it
accessible to users.
2.
Standard Object Tabs:
o
These tabs provide access to standard objects provided by
Salesforce, such as Accounts, Contacts, Opportunities, and Cases.
3.
Web Tabs:
o
These tabs allow you to embed external web applications or
websites within Salesforce. You can create a web tab to display any web page
within the Salesforce interface.
4.
Visualforce Tabs:
o
These tabs display Visualforce pages. Visualforce is a framework
that allows developers to build custom user interfaces in Salesforce. A
Visualforce tab can display any Visualforce page you create.
5.
Lightning Component Tabs:
o
These tabs display Lightning components. Lightning components are
reusable building blocks for creating modern user interfaces in Salesforce. A
Lightning component tab can display any Lightning component you create.
How to Create a Custom Tab
1.
Navigate to Setup:
o
Log in to Salesforce and click on the gear icon in the top right
corner.
o
Select "Setup" from the dropdown menu.
2.
Go to Tabs:
o
In the Setup menu, type "Tabs" in the Quick Find box and
select "Tabs."
3.
Create a New Tab:
o
Click the "New" button next to the type of tab you want
to create (e.g., Custom Object Tabs, Web Tabs, Visualforce Tabs).
4.
Define Tab Properties:
o
Fill in the required details, such as the tab label, tab name, and
the object or page the tab will display.
5.
Set Tab Visibility:
o
Define the tab visibility for different profiles to control who
can see the tab.
6.
Save the Tab:
o
Click "Save" to create the tab.
Tabs in
Salesforce are essential for organizing and accessing data, making it easier
for users to navigate and interact with the application.
Page Layouts
Page Layouts in Salesforce are used to control the layout and organization of
fields, related lists, and other elements on a record detail page. They help
customize the user interface to meet the specific needs of different users and
profiles.
Key features
of page layouts:
1.
Field Arrangement: Determine the order and grouping of fields on the record detail
page.
2.
Related Lists: Control which related lists are displayed and their order.
3.
Buttons and Actions: Customize the buttons and actions available on the record detail
page.
4.
Sections: Organize fields into sections to improve readability and
usability.
5.
Custom Links: Add custom links to external resources or other Salesforce
pages.
Creating
and managing page layouts:
1.
Navigate to Setup:
o
Log in to Salesforce and click on the gear icon in the top right
corner.
o
Select "Setup" from the dropdown menu.
2.
Go to Object Manager:
o
In the Setup menu, type "Object Manager" in the Quick
Find box and select "Object Manager."
3.
Select the Object:
o
In the Object Manager, find and click on the object you want to
customize (e.g., Account, Contact, or a custom object).
4.
Go to Page Layouts:
o
Click on the "Page Layouts" tab.
5.
Create or Edit a Page Layout:
o
Click the "New" button to create a new page layout or
click on an existing page layout to edit it.
6.
Customize the Layout:
o
Drag and drop fields, related lists, buttons, and other elements
to customize the layout.
o
Use sections to group related fields together.
7.
Assign Page Layouts to Profiles:
o
After customizing the page layout, you can assign it to different
profiles to control which users see the layout.
Example
Let's say you
want to create a custom page layout for the Account object that includes a
section for "Billing Information" and another section for
"Shipping Information." You would follow the steps above to create
the layout, add the necessary fields, and organize them into the appropriate
sections.
Page layouts
are a powerful tool in Salesforce that help tailor the user interface to meet
the specific needs of different users and profiles, improving usability and
efficiency.
Record Types
Record
Types
in Salesforce allow you to offer different business processes, picklist values,
and page layouts to different users based on their profiles. This is useful
when you have multiple business processes or types of records within the same
object. Here’s a deeper dive into what record types is and how they can be
used:
Key features
of record types
1.
Business Processes: Record types can be used to define different business processes
for different types of records. For example, you might have different sales
processes for different product lines.
2.
Picklist Values: You can customize picklist values for different record types.
This means that users will see different options in picklist fields based on
the record type they are working with.
3.
Page Layouts: Record types allow you to assign different page layouts to
different profiles. This means that users will see different fields and layouts
based on their role and the record type.
Example
use cases:
·
Sales Processes: Different sales processes for different types of opportunities,
such as new business, renewal business, and upsell opportunities.
·
Support Processes: Different support processes for different types of cases, such
as technical support, billing issues, and product returns.
·
Lead Processes: Different lead processes for different types of leads, such as
web leads, trade show leads, and partner leads.
Creating
Record Types
1.
Navigate to Setup:
o
Log in to Salesforce and click on the gear icon in the top right
corner.
o
Select "Setup" from the dropdown menu.
2.
Go to Object Manager:
o
In the Setup menu, type "Object Manager" in the Quick
Find box and select "Object Manager."
3.
Select the Object:
o
In the Object Manager, find and click on the object you want to
create a record type for (e.g., Account, Contact, or a custom object).
4.
Create a New Record Type:
o
Click on "Record Types" in the sidebar, then click the
"New" button.
o
Fill in the required details, such as Record Type Label, Record
Type Name, and any additional settings specific to the record type.
o
Assign the record type to profiles and set the default record type
for each profile.
5.
Assign Page Layouts:
o
Choose the page layouts that will be used for this record type.
6.
Save the Record Type:
o
Click "Save" to create the record type.
Record types
are a powerful feature in Salesforce that can help you tailor the user
experience and streamline business processes.
Relationships
In
Salesforce, relationships are used to link objects together, allowing you to
create complex data models and establish connections between different pieces
of information. There are several types of relationships in Salesforce:
Lookup Relationship
1.
Definition: A loose relationship between two objects. Each object maintains
its own security and sharing settings.
2.
Use Case: When you need to link two objects but keep them independent.
3.
Example: Linking a Contact to an Account.
Master-Detail
Relationship
·
Definition: A strong relationship where the child object's existence is
dependent on the parent object. The child object inherits the parent's security
and sharing settings.
·
Use Case: When you need to ensure that the child object cannot exist
without the parent.
·
Example: Linking an Opportunity Line Item to an Opportunity.
Many to Many
Relationship
·
Definition: A relationship that allows each record of one object to be
linked to multiple records of another object and vice versa. This is achieved
using a junction object.
·
Use Case: When you need to link multiple records of one object to multiple
records of another.
·
Example: Linking a Campaign to multiple Leads and a Lead to multiple
Campaigns using a Campaign Member junction object.
Hierarchical
Relationship
·
Definition: A special type of lookup relationship available only for the
User object. It allows you to create a hierarchy among users.
·
Use Case: When you need to establish a reporting structure among users.
·
Example: Linking a user to their manager.
Summary
·
Lookup Relationship: Loose connection, independent objects.
·
Master-Detail Relationship: Strong connection, dependent
objects.
·
Many-to-Many Relationship: Complex connection using a
junction object.
·
Hierarchical Relationship: Special lookup for user
hierarchy.
These
relationships help you create a structured and interconnected data model in
Salesforce, enabling you to manage and analyze your data more effectively.
Related Lookup Filters
Related Lookup Filters in
Salesforce are administrator settings that restrict the valid values and lookup
dialog results for lookup, master-detail, and hierarchical relationship fields.
These filters help improve user productivity and data quality by ensuring that
users can only select valid and relevant records when using lookup fields.
Key Features
of Lookup Filters:
1.
Filter Criteria: Administrators can configure filter criteria that compare fields
and values on:
o
The current record (source)
o
The lookup object (target)
o
The user's record, permissions, and role
o
Records directly related to the target object
2.
Examples of Lookup Filters:
o
Restrict the Account Name field on opportunities to allow only
accounts with a record type of Customer.
o
Restrict the Contact field on cases to allow only contacts
associated with the account specified in the Account Name field on the case
record.
o
Restrict the Account Name field on cases to allow only users with
the International Sales profile to create or edit cases for accounts outside
the United States.
3.
Required and Optional Filters:
o
In Salesforce Classic, administrators can make lookup filters
required or optional.
o
In Lightning Experience, all lookup filters are required, even if
admins specify them as optional in Setup.
4.
Error Messages: For fields with required lookup filters, values that match the
lookup filter criteria appear in the lookup dialog. Users cannot save invalid
values that they type in the field. If a user tries to save an invalid value,
Salesforce displays an error message, which administrators can customize.
How to create
lookup Filter:
1.
Navigate to Setup:
o
Log in to Salesforce and click on the gear icon in the top right
corner.
o
Select "Setup" from the dropdown menu.
2.
Go to Object Manager:
o
In the Setup menu, type "Object Manager" in the Quick
Find box and select "Object Manager."
3.
Select the Object:
o
In the Object Manager, find and click on the object you want to
add the lookup filter to (e.g., Account, Contact, or a custom object).
4.
Go to Fields & Relationships:
o
Click on the "Fields & Relationships" tab.
5.
Edit the Lookup Field:
o
Find the lookup field you want to add the filter to and click
"Edit."
6.
Configure the Lookup Filter:
o
In the Lookup Filter section, click "Show Filter
Settings."
o
Define the filter criteria by selecting the field, operator, and
value.
o
Choose whether the filter is required or optional (Salesforce
Classic only).
7.
Save the Lookup Filter:
o
Click "Save" to apply the lookup filter.
Lookup
filters are a powerful tool in Salesforce that help ensure data integrity and
improve user efficiency by restricting the selection of valid and relevant
records.
Validation rules
Validation rules in Salesforce are used to ensure
data integrity by verifying that the data entered in records meets specific
criteria before the record can be saved. They help enforce business rules and
prevent users from entering invalid data.
Key features
of validation rules:
1.
Formula-Based: Validation rules use formulas to define the criteria that must
be met for the data to be considered valid.
2.
Error Messages: When a validation rule is triggered, an error message is
displayed to the user, explaining what needs to be corrected.
3.
Field-Level Validation: Validation rules can be applied
to specific fields to ensure that the data entered in those fields meets the
required criteria.
4.
Cross-Object Validation: Validation rules can reference
fields from related objects to enforce complex business rules.
Example
use cases:
·
Required Fields: Ensure that certain fields are not left blank.
·
Data Format: Verify that data entered in a field follows a specific format
(e.g., email addresses, phone numbers).
·
Conditional Logic: Enforce rules based on the values of other fields (e.g., if the
"Status" field is "Closed," the "Close Date" must
be populated).
·
Range Checks: Ensure that numeric values fall within a specified range (e.g.,
discount percentage must be between 0 and 100).
How
to create the validations rules:
1.
Navigate to Setup:
o
Log in to Salesforce and click on the gear icon in the top right
corner.
o
Select "Setup" from the dropdown menu.
2.
Go to Object Manager:
o
In the Setup menu, type "Object Manager" in the Quick
Find box and select "Object Manager."
3.
Select the Object:
o
In the Object Manager, find and click on the object you want to
create a validation rule for (e.g., Account, Contact, or a custom object).
4.
Go to Validation Rules:
o
Click on the "Validation Rules" tab.
5.
Create a New Validation Rule:
o
Click the "New" button to create a new validation rule.
6.
Define the Rule Criteria:
o
Enter the Rule Name and Description.
o
Define the Error Condition Formula that specifies the criteria for
the validation rule.
o
Enter the Error Message that will be displayed when the rule is
triggered.
7.
Save the Validation Rule:
o
Click "Save" to create the validation rule.
Example:
Let's say you
want to create a validation rule for the Account object to ensure that the
"Annual Revenue" field is not left blank. You would follow the steps
above and define the Error Condition Formula as ISBLANK(AnnualRevenue)
.
The Error Message could be "Annual Revenue cannot be blank."
Validation
rules are a powerful tool in Salesforce that help maintain data quality and
enforce business rules.
Security Controls in Salesforce:
Salesforce
provides a comprehensive set of security controls to protect your data and
ensure that users have appropriate access to the information they need. Here
are the key security controls in Salesforce:
User Authentication:
·
Username and Password: Standard login credentials for
accessing Salesforce.
·
Multi-Factor Authentication (MFA): Adds an
extra layer of security by requiring users to verify their identity using a
second factor, such as a mobile app or hardware token.
·
Single Sign-On (SSO): Allows users to log in to Salesforce using their organization's
identity provider.
Profiles and Permission
sets:
·
Profiles: Define the baseline permissions and access settings for users,
including object permissions, field-level security, and app settings.
·
Permission Sets: Provide additional permissions to users on top of their profile
permissions, allowing for more granular control of user access.
Roles and
Sharing Rules:
·
Roles: Determine the visibility of data based on the user's position in
the hierarchy. Roles control record-level access.
·
Sharing Rules: Provide additional access to records based on criteria, allowing
you to share records with users in specific roles, groups, or territories.
Field-Level
Security:
·
Field Visibility: Controls whether users can see specific fields.
·
Field Read-Only: Controls whether users can edit specific fields.
Object-Level
Security:
Object
Permissions: Control access to objects, including the ability to create,
read, edit, and delete records.
Record-Level
Security:
Organization-Wide
Defaults (OWD): Define the default access level for records within the
organization.
Role
Hierarchy: Allows users higher in the hierarchy to access records owned by
users below them.
Manual
Sharing: Allows users to share individual records with other users.
Login access
and IP restrictions:
Login Hours: Define the
hours during which users can log in to Salesforce.
Login IP
Ranges:
Define the IP ranges from which users can log in to Salesforce.
Audit and
Monitoring:
Field History
Tracking: Tracks changes to specified fields and records the history.
Login History: Tracks user
login attempts and provides details about successful and failed logins.
Event
Monitoring: Provides detailed logs of user activity, such as page views, API
calls, and data exports.
Encryption:
Shield
Platform Encryption: Provides encryption for data at rest, ensuring that sensitive
information is protected.
Data loss
Prevention:
Data Masking: Masks
sensitive data in sandbox environments to prevent unauthorized access.
Data Export
Controls: Restricts the ability to export data from Salesforce.
These
security controls help ensure that your Salesforce environment is secure and
that users have the appropriate level of access to perform their job functions
effectively.
Users
In
Salesforce, users are individuals who have login access
to the Salesforce organization. Each user has a unique username and password,
and their access to data and functionality is controlled by profiles, roles,
and permission sets.
Key Features
of Users in Salesforce:
1.
User Profiles: Define the permissions and access settings for users, including
object permissions, field-level security, and app settings.
2.
Roles: Determine the visibility of data based on the user's position in
the hierarchy. Roles control record-level access.
3.
Permission Sets: Provide additional permissions to users on top of their profile
permissions. They allow for more granular control of user access.
4.
User Licenses: Define the baseline features and functionality available to
users. Different licenses provide different levels of access.
5.
Login Access: Users can log in to Salesforce using their unique username and
password. Administrators can set login hours and IP ranges to control when and
where users can log in.
6.
User Management: Administrators can create, deactivate, and manage users in
Salesforce. They can also reset passwords and assign roles, profiles, and
permission sets.
Creating and managing
of users:
1.
Navigate to Setup:
o
Log in to Salesforce and click on the gear icon in the top right
corner.
o
Select "Setup" from the dropdown menu.
2.
Go to Users:
o
In the Setup menu, type "Users" in the Quick Find box
and select "Users."
3.
Create a New User:
o
Click the "New User" button to create a new user.
o
Fill in the required details, such as First Name, Last Name,
Email, Username, and Profile.
o
Assign a Role and User License.
o
Click "Save" to create the user.
4.
Manage Existing Users:
o
To manage existing users, click on the user's name in the Users
list.
o
You can edit user details, reset passwords, deactivate users, and
assign roles, profiles, and permission sets.
Example:
Let's say you
want to create a new user for a Sales Representative. You would follow the
steps above, assign the user a Sales Representative profile, and set their role
to Sales Rep. You can also assign additional permissions using permission sets
if needed.
Users in
Salesforce are essential for managing access to data and functionality,
ensuring that each user has the appropriate level of access to perform their
job functions effectively.
In
Salesforce, roles
are used to control the visibility of data within the organization. They
determine what data users can see based on their position in the hierarchy.
Roles are essential for managing data access and ensuring that users have the
appropriate level of visibility to perform their job functions.
Key features
of Roles:
1.
Hierarchy: Roles are organized in a hierarchical structure, allowing users
higher in the hierarchy to access data owned by users below them.
2.
Data Access: Roles control record-level access, such as which records a user
can view, edit, or delete.
3.
Sharing Rules: Roles work in conjunction with sharing rules to provide
additional access to records based on criteria.
4.
Reports and Dashboards: Roles can be used to filter data
in reports and dashboards, ensuring that users see only the data relevant to
their role.
Example
of Role Hierarchy:
·
CEO: Has access to all data in the organization.
o
VP of Sales: Has access to all sales data.
§ Sales Manager: Has access
to data for their sales team.
§ Sales
Representative: Has access to their own data and the data of their direct
reports.
Creating
and managing the Roles:
1.
Navigate to Setup:
o
Log in to Salesforce and click on the gear icon in the top right
corner.
o
Select "Setup" from the dropdown menu.
2.
Go to Roles:
o
In the Setup menu, type "Roles" in the Quick Find box
and select "Roles."
3.
Create a New Role:
o
Click the "Set Up Roles" button and then click "Add
Role" to create a new role.
4.
Define Role Properties:
o
Fill in the required details, such as Role Name, Role Label, and
Parent Role (if applicable).
5.
Assign Users to Roles:
o
After creating the role, you can assign users to it by navigating
to the "Users" section and editing the user's role.
Roles in
Salesforce are crucial for managing data visibility and ensuring that users
have the appropriate access to perform their job functions effectively.
Profiles
Profiles in Salesforce are used to define a user's permissions and access
settings. They determine what users can do within Salesforce, including what
data they can see and what actions they can perform. Profiles are essential for
managing user permissions and ensuring that users have the appropriate level of
access to perform their job functions.
Key features
of Profiles:
1.
Object Permissions: Control access to objects, including the ability to create,
read, edit, and delete records.
2.
Field-Level Security: Control access to individual fields within an object, including
the ability to view or edit specific fields.
3.
User Permissions: Define permissions for specific actions, such as exporting data,
running reports, and managing users.
4.
Page Layout Assignments: Assign different page layouts to
users based on their profile.
5.
Record Types: Control access to different record types within an object.
6.
App Settings: Control access to specific apps and tabs within Salesforce.
7.
Login Hours: Define the hours during which users can log in to Salesforce.
8.
Login IP Ranges: Define the IP ranges from which users can log in to Salesforce.
Example
Use Cases of Profile:
·
System Administrator: A profile with full access to all objects, fields, and settings
in Salesforce.
·
Sales Representative: A profile with access to sales-related objects, such as
Accounts, Contacts, and Opportunities, with permissions to create, read, edit,
and delete records.
·
Support Agent: A profile with access to support-related objects, such as Cases
and Solutions, with permissions to create, read, edit, and delete records.
Creating and
managing the profiles:
1.
Navigate to Setup:
o
Log in to Salesforce and click on the gear icon in the top right
corner.
o
Select "Setup" from the dropdown menu.
2.
Go to Profiles:
o
In the Setup menu, type "Profiles" in the Quick Find box
and select "Profiles."
3.
Create a New Profile:
o
Click the "New Profile" button to create a new profile.
o
Choose an existing profile to clone and enter the required
details, such as Profile Name.
4.
Customize Profile Settings:
o
Customize the profile settings, including object permissions,
field-level security, user permissions, and app settings.
5.
Save the Profile:
Click "Save" to create the
profile.
Profiles
in Salesforce are crucial for managing user permissions and ensuring that users
have the appropriate access to perform their job functions effectively.
In
Salesforce, profiles control a wide range of permissions and settings that
determine what users can do within the platform. Here are the key permissions
and settings that can be controlled using profiles:
Object
Permission:
·
Create: Allows users to create records for the object.
·
Read: Allows users to view records for the object.
·
Edit: Allows users to edit records for the object.
·
Delete: Allows users to delete records for the object.
·
View All: Allows users to view all records for the object, regardless of
sharing settings.
·
Modify All: Allows users to edit and delete all records for the object,
regardless of sharing settings.
Field-Level
security:
·
Visible: Controls whether users can see the field.
·
Read-Only: Controls whether users can edit the field.
User Permission:
·
View Setup and Configuration: Allows
users to view the setup and configuration pages.
·
Customize Application: Allows users to customize the
application, including creating custom objects and fields.
·
Manage Users: Allows users to create, edit, and deactivate users.
·
Modify All Data: Allows users to view, edit, and delete all data in the
organization.
·
API Enabled: Allows users to access Salesforce via the API.
·
Run Reports: Allows users to run reports.
·
Export Reports: Allows users to export report data.
·
Manage Dashboards: Allows users to create and edit dashboards.
·
View All Data: Allows users to view all data in the organization.
·
Manage Public Documents: Allows users to manage public
documents.
·
Manage Public Templates: Allows users to manage public
email templates.
·
Manage Campaigns: Allows users to create, edit, and delete campaigns.
·
Manage Cases: Allows users to create, edit, and delete cases.
·
Manage Leads: Allows users to create, edit, and delete leads.
·
Manage Opportunities: Allows users to create, edit, and delete opportunities.
App settings:
·
Tab Settings: Controls whether tabs are visible, hidden, or available as
default.
·
Record Types: Controls access to different record types within an object.
·
Page Layouts: Assigns different page layouts to users based on their profile.
·
App Permissions: Controls access to specific apps within Salesforce.
Login Access:
·
Login Hours: Defines the hours during which users can log in to Salesforce.
·
Login IP Ranges: Defines the IP ranges from which users can log in to Salesforce.
Administrative
permission:
·
View All Users: Allows users to view all user records.
·
Manage Profiles and Permission Sets: Allows
users to create and edit profiles and permission sets.
·
Manage Roles: Allows users to create and edit roles.
·
Manage Sharing: Allows users to manage sharing settings.
·
Manage Custom Permissions: Allows users to create and
manage custom permissions.
Permission Sets
Permission Sets in Salesforce are a powerful tool
that allows administrators to grant additional permissions to users on top of
their profile permissions. They provide a flexible way to manage user access
and ensure that users have the necessary permissions to perform their job
functions without changing their profiles.
Key Features of Permission Sets:
1.
Granular Control: Permission sets allow you to grant specific permissions to users
without modifying their profiles.
2.
Reusable: Once created, permission sets can be assigned to multiple users,
making it easy to manage permissions across the organization.
3.
Flexible: Permission sets can be used to grant permissions temporarily or
for specific projects, providing flexibility in managing user access.
Types of
permission in permission sets:
1.
Object Permissions: Control access to objects, including the ability to create,
read, edit, and delete records.
2.
Field-Level Security: Control access to individual fields within an object, including
the ability to view or edit specific fields.
3.
User Permissions: Define permissions for specific actions, such as exporting data,
running reports, and managing users.
4.
App Permissions: Control access to specific apps within Salesforce.
5.
System Permissions: Grant permissions for system-level actions, such as API access
and managing custom settings.
Creating and
managing permission sets:
1.
Navigate to Setup:
o
Log in to Salesforce and click on the gear icon in the top right
corner.
o
Select "Setup" from the dropdown menu.
2.
Go to Permission Sets:
o
In the Setup menu, type "Permission Sets" in the Quick
Find box and select "Permission Sets."
3.
Create a New Permission Set:
o
Click the "New" button to create a new permission set.
o
Enter the required details, such as the Label, API Name, and
Description.
o
Click "Save" to create the permission set.
4.
Assign Permissions:
o
After creating the permission set, you can assign permissions by
navigating to the relevant sections, such as Object Settings, Field
Permissions, and System Permissions.
o
Select the permissions you want to grant and click
"Save."
5.
Assign Permission Sets to Users:
o
Navigate to the "Manage Assignments" section of the
permission set.
o
Click "Add Assignments" and select the users you want to
assign the permission set to.
o
Click "Assign" to complete the process.
Example:
Let's say you
want to grant a group of users access to a custom object called
"Project" without modifying their profiles. You can create a
permission set called "Project Access" and grant the necessary object
permissions for the "Project" object. Then, you can assign the
permission set to the relevant users.
Permission
sets provide a flexible and efficient way to manage user permissions in
Salesforce, ensuring that users have the appropriate access to perform their
job functions effectively.
Organization-Wide Defaults (OWD)
In Salesforce
are the baseline level of access to records for all users in the organization.
They define the default sharing settings for objects and determine the level of
access users have to records they do not own. OWD settings are crucial for
maintaining data security and ensuring that users have appropriate access to
records.
Key Features
of OWD:
1.
Public Read/Write: All users can view, edit, and delete records.
2.
Public Read Only: All users can view records, but only the owner and users above
the owner in the role hierarchy can edit and delete records.
3.
Private: Only the record owner and users above the owner in the role
hierarchy can view, edit, and delete records.
4.
Controlled by Parent: Access to records is determined by the parent object in a
master-detail relationship.
How to set
OWD:
1.
Navigate to Setup:
o
Log in to Salesforce and click on the gear icon in the top right
corner.
o
Select "Setup" from the dropdown menu.
2.
Go to Sharing Settings:
o
In the Setup menu, type "Sharing Settings" in the Quick
Find box and select "Sharing Settings."
3.
Edit OWD:
o
In the Organization-Wide Defaults section, click "Edit."
o
Set the default access level for each object (e.g., Public
Read/Write, Public Read Only, Private).
o
Click "Save" to apply the changes.
Example:
Let's say you
want to set the OWD for the Account object to "Private." This means
that only the record owner and users above the owner in the role hierarchy can
view, edit, and delete account records. You would follow the steps above and
set the default access level for the Account object to "Private."
OWD settings
are the foundation of Salesforce's security model, and they work in conjunction
with roles, sharing rules, and manual sharing to provide a comprehensive data
access control system.
Sharing Rules
Sharing Rules in Salesforce are used to extend the access granted by
organization-wide defaults (OWD) and role hierarchies. They provide additional
access to records based on criteria, allowing you to share records with users
in specific roles, groups, or territories. Sharing rules help ensure that users
have the appropriate level of access to perform their job functions
effectively.
Key Features
of Sharing Rules:
1.
Criteria-Based Sharing Rules: Share
records based on field values. For example, share all accounts with a specific
industry.
2.
Owner-Based Sharing Rules: Share records owned by users in
a specific role or group. For example, share all opportunities owned by users
in the Sales team.
3.
Public Groups: Share records with a group of users defined by the
administrator. Public groups can include users, roles, and other public groups.
4.
Territory-Based Sharing Rules: Share
records based on territories in the Salesforce Territory Management feature.
Creating and
managing of Sharing Rules:
1.
Navigate to Setup:
o
Log in to Salesforce and click on the gear icon in the top right
corner.
o
Select "Setup" from the dropdown menu.
2.
Go to Sharing Settings:
o
In the Setup menu, type "Sharing Settings" in the Quick
Find box and select "Sharing Settings."
3.
Create a New Sharing Rule:
o
In the Sharing Rules section, click "New" to create a
new sharing rule.
o
Choose the object for which you want to create the sharing rule
(e.g., Account, Contact, Opportunity).
4.
Define the Rule Criteria:
o
For criteria-based sharing rules, define the criteria that records
must meet to be shared.
o
For owner-based sharing rules, select the role or group whose
records will be shared.
5.
Specify the Access Level:
o
Choose the level of access to be granted (e.g., Read-Only,
Read/Write).
6.
Select the Users to Share With:
o
Specify the roles, groups, or territories with whom the records
will be shared.
7.
Save the Sharing Rule:
o
Click "Save" to create the sharing rule.
Example:
Let's say you
want to create a sharing rule to share all accounts with the industry
"Technology" with the Sales team. You would follow the steps above,
define the criteria as "Industry equals Technology," and specify the
Sales team as the group to share with.
Sharing rules
are a powerful tool in Salesforce that help ensure users have the appropriate
access to records, enhancing collaboration and productivity.
Manual Sharing
Manual Sharing in Salesforce allows users to
share individual records with other users, roles, or groups on a one-off basis.
This feature is particularly useful when you need to grant access to specific
records that are not covered by organization-wide defaults (OWD), role
hierarchies, or sharing rules.
Key Features
of Manual Sharing:
1.
Record-Level Access: Provides granular control over access to individual records.
2.
Flexible Sharing: Allows users to share records with specific users, roles, or
groups as needed.
3.
Temporary Access: Can be used to grant temporary access to records for specific
tasks or projects.
How to manage
Manual sharing:
1.
Navigate to the Record:
o
Go to the record you want to share (e.g., an Account, Contact,
Opportunity, or custom object record).
2.
Click on the Sharing Button:
o
On the record detail page, click the "Sharing" button.
If you don't see the "Sharing" button, it may need to be added to the
page layout by an administrator.
3.
Add Sharing:
o
In the Sharing window, click "Add" to create a new
sharing entry.
4.
Select the User, Role, or Group:
o
Choose the user, role, or group you want to share the record with.
5.
Set the Access Level:
o
Specify the level of access you want to grant (e.g., Read-Only,
Read/Write).
6.
Save the Sharing Entry:
o
Click "Save" to apply the sharing settings.
Example:
Let's say you
have an Account record that you want to share with a colleague who is not in
your role hierarchy. You would follow the steps above to manually share the
Account record with your colleague, granting them the necessary access to view
or edit the record.
Manual
sharing is a powerful tool in Salesforce that provides flexibility in managing
record-level access, ensuring that users have the appropriate access to perform
their job functions effectively.
Custom Permissions
Custom Permissions in Salesforce allow you to define
and manage user permissions for specific business processes or features that
are not covered by standard Salesforce permissions. They provide a flexible way
to control access to custom functionality and can be used in various ways, such
as in validation rules, Apex classes, and Visualforce pages.
Key Features
of Custom Permission:
1.
Granular Control: Custom permissions allow you to grant or restrict access to
specific features or processes at a granular level.
2.
Reusable: Once created, custom permissions can be reused across multiple
components, such as validation rules, Apex classes, and Visualforce pages.
3.
Profiles and Permission Sets: Custom
permissions can be assigned to users through profiles and permission sets,
making it easy to manage access.
Example Use
Cases:
·
Feature Access: Control access to a custom feature or button in the user
interface.
·
Validation Rules: Use custom permissions in validation rules to enforce specific
business logic based on user permissions.
·
Apex Classes: Check for custom permissions in Apex classes to control the
execution of certain code blocks.
·
Visualforce Pages: Restrict access to Visualforce pages based on custom
permissions.
How to create
custom permissions:
1.
Navigate to Setup:
o
Log in to Salesforce and click on the gear icon in the top right
corner.
o
Select "Setup" from the dropdown menu.
2.
Go to Custom Permissions:
o
In the Setup menu, type "Custom Permissions" in the
Quick Find box and select "Custom Permissions."
3.
Create a New Custom Permission:
o
Click the "New" button to create a new custom
permission.
o
Enter the required details, such as the Label, Name, and
Description.
o
Click "Save" to create the custom permission.
4.
Assign Custom Permissions:
o
Custom permissions can be assigned to users through profiles and
permission sets.
o
Navigate to the profile or permission set you want to modify.
o
In the profile or permission set, go to the "Custom
Permissions" section and add the custom permission you created.
Example:
Let's say you
have a custom feature called "Advanced Reporting" that should only be
accessible to certain users. You can create a custom permission called
"Access_Advanced_Reporting" and assign it to the relevant profiles or
permission sets. Then, you can use this custom permission in your Apex code or
Visualforce pages to control access to the feature.
Custom
permissions provide a powerful and flexible way to manage user access to custom
functionality in Salesforce.
Custom Settings
Custom Settings in Salesforce are similar to
custom objects and allow you to create custom sets of data that can be used
across your organization. They are particularly useful for storing
configuration data that can be accessed by your Apex code, validation rules,
formulas, and other customizations. Custom settings can help reduce the number
of queries to the database and improve performance.
Types of
Custom Setting:
1.
List Custom Settings:
o
Definition: Similar to a custom object, list custom settings allow you to
create a set of data that can be accessed by all users.
o
Use Case: Store data that is common across the organization, such as
application settings or configuration values.
o
Example: A list of countries and their corresponding codes.
2.
Hierarchy Custom Settings:
o
Definition: Similar to list custom settings, but with the added ability to
define different values for different profiles or users.
o
Use Case: Store data that varies based on the user or profile, such as
user-specific preferences or settings.
o
Example: Different discount rates for different user profiles.
Create and
manage custom settings:
1.
Navigate to Setup:
o
Log in to Salesforce and click on the gear icon in the top right
corner.
o
Select "Setup" from the dropdown menu.
2.
Go to Custom Settings:
o
In the Setup menu, type "Custom Settings" in the Quick
Find box and select "Custom Settings."
3.
Create a New Custom Setting:
o
Click the "New" button to create a new custom setting.
o
Choose the type of custom setting (List or Hierarchy) and enter
the required details, such as the Label, Object Name, and Description.
o
Click "Save" to create the custom setting.
4.
Define Fields:
o
After creating the custom setting, you can define fields by
clicking "New" in the Custom Fields section.
o
Enter the required details for each field, such as Field Label,
Field Name, Data Type, and Length.
o
Click "Save" to create the field.
5.
Manage Data:
o
For list custom settings, you can add data by clicking
"Manage" and then "New" to create new records.
o
For hierarchy custom settings, you can add data by clicking
"Manage" and then selecting the appropriate profile or user to create
new records.
Example:
Let's say you
want to create a custom setting to store application configuration values, such
as API endpoints and timeout values. You would follow the steps above to create
a list custom setting called "AppConfig" and define fields for
"APIEndpoint" and "TimeoutValue." You can then add records
to store the configuration values.
Custom
settings are a powerful tool in Salesforce that help you manage configuration
data and improve the performance of your customizations.
Custom Metadata Types
Custom Metadata Types in
Salesforce allow you to create your own metadata to define application
configurations and manage custom settings. Unlike custom settings, custom
metadata types are metadata themselves, which means they can be deployed from
one environment to another using change sets or the Metadata API. This makes
them particularly useful for managing configuration data that needs to be
consistent across multiple environments.
Key Features
of custom Metadata Types:
1.
Deployable: Custom metadata types can be deployed using change sets,
packages, or the Metadata API, making it easy to move configuration data
between environments.
2.
Version Control: Since custom metadata types are metadata, they can be included
in version control systems, allowing you to track changes and manage versions.
3.
Declarative Access: Custom metadata types can be accessed declaratively in
validation rules, formulas, and flows, as well as programmatically in Apex
code.
4.
Protected Custom Metadata: You can create protected custom
metadata types that are not visible to subscribers of a managed package,
ensuring that sensitive configuration data is kept secure.
Example Use
cases:
·
Application Configuration: Store configuration settings for
your application, such as API endpoints, feature toggles, and default values.
·
Business Rules: Define business rules and logic that can be easily updated and
deployed across environments.
·
Reference Data: Store reference data, such as country codes, tax rates, and
product categories, that needs to be consistent across environments.
Creating and managing
custom metadata Types:
1.
Navigate to Setup:
o
Log in to Salesforce and click on the gear icon in the top right
corner.
o
Select "Setup" from the dropdown menu.
2.
Go to Custom Metadata Types:
o
In the Setup menu, type "Custom Metadata Types" in the
Quick Find box and select "Custom Metadata Types."
3.
Create a New Custom Metadata Type:
o
Click the "New Custom Metadata Type" button.
o
Enter the required details, such as the Label, Plural Label, and
Object Name.
o
Click "Save" to create the custom metadata type.
4.
Define Fields:
o
After creating the custom metadata type, you can define fields by
clicking "New" in the Custom Fields section.
o
Enter the required details for each field, such as Field Label,
Field Name, Data Type, and Length.
o
Click "Save" to create the field.
5.
Manage Records:
o
To add records to your custom metadata type, click "Manage
Records" and then "New" to create new records.
o
Enter the required details for each record and click
"Save."
Example:
Let's say you
want to create a custom metadata type to store API endpoints for different
environments (e.g., development, staging, production). You would follow the
steps above to create a custom metadata type called "API_Endpoints"
and define fields for "Environment" and "Endpoint_URL." You
can then add records for each environment with the corresponding API endpoint.
Custom
metadata types provide a powerful and flexible way to manage configuration data
in Salesforce, ensuring consistency and ease of deployment across environments.
If enjoyed this article, please stay for further updates.
Thank you for reading the article.
Jayanth A
Comments
Post a Comment