Salesforce Admin
Chapter - 1
What is salesforce ?
(BUSINESS TO BUSINESS)
Salesforce in Simple Terms: Salesforce is a platform that helps businesses
manage their relationships with customers.
Example :- Imagine you run a lemonade stand.
1. You have lots of customers coming in every day.
2. You keep a notebook to write down:
o Their names.
o What kind of lemonade they like.
o How much they usually buy.
3. This notebook also reminds you to send them a message if you’re offering
a new lemonade flavour or if you want to say “thank you” for being a
great customer.
Now, instead of writing it all down, Salesforce does this automatically on your
computer or phone and keeps everything neat and organized. It’s like having a
super-smart notebook that helps you grow your lemonade stand into a big
business!
CRM
CRM stands for Customer Relationship Management. It's a system or
tool that businesses use to manage all their interactions with customers,
both current and potential. The goal of CRM is to build stronger
relationships with customers and improve sales and service.
Analogy:
Think of CRM like a personal diary + assistant for your business:
It remembers every customer’s name, preferences, and past
purchases (like a diary).
It reminds you when to follow up with them or offer something they
might like (like an assistant).
It helps your whole team work together to make sure customers are
happy and loyal.
Difference
CRM (Customer Relationship Management):
CRM is the concept or system businesses use to manage
customer interactions.
It helps track customers, their needs, and how to keep them happy.
Think of CRM as the idea of keeping everything about customer
relationships organized.
Salesforce:
Salesforce is a specific tool or platform that provides CRM.
It’s one of the most popular brands of CRM software.
Think of Salesforce as one of the apps or services that helps
businesses implement the CRM idea.
Analogy to Differentiate:
CRM is like the idea of exercising to stay healthy.
Salesforce is like a gym where you can go to exercise.
Setup salesforce Developer ORG
Commerce Cloud.
MuleSoft: - to transfer data from one data to
another.
Playground is salesforce ORG.
1. Make salesforce Developer
Salesforce Data Model
Object, Record, Tab &
App
OBJECT
Standard object
An object can have two things : -
State (Properties / details of object) book have name, ISBN,
pages , author
Behaviour Book [to give information]
How many Standard objects r in
Salesforce?
There are 200 standard objects.
Custom Objects: - that we create.
Field
Default fields in custom
object
Standard Fields: Every custom object includes a set of standard
fields such as:
Name
Creation Date
Last Modified Date
Owner
Description
Datatypes (for storing fields)
Text Allows users to enter any combination of letters and
numbers. Example : - Employee ID – EMP12345
Text Area Allows users to enter up to 255 characters on
separate lines. Example: - Short Customer Feedback
Text Area (Long) Allows users to enter up to 131,072 characters on
separate lines. Example: - Incident Report
Text Area (Rich) Allows users to enter formatted text, add images and
links. Up to 131,072 characters on separate lines.
Newsletter Content
Text (Encrypted) Allows users to enter any combination of letters and
numbers and store them in encrypted form. Social
Security Number (SSN)
We can change currency location in company information under
currency locale tab.
in picklist if we checked then if we make picklist from backend
and then we insert, we can’t insert other values in this.
Global Picklist
When a picklist is used in one or more objects we
used global picklist.
We do it by promoting to global value set when we
create picklist or when we edit it.
Global picklist is restricted it means we can’t
change it by code.
characters length < 255
Two way to create it
1. When we create a picklist and then there’s a option below to
promote to global picklist.
2. We can use picklist value sets and click new.
DEPENDENT PICKLIST
1. Controlling Field- picklist (single select), checkbox, standard field
can be used.
2. Dependent Field – picklist (single select, multi-select)
Controlling field example when we select country field INDIA then states of
this country should be shown.
And we go to field dependency in object manager.
1. We cant make multiselect picklist – controlling field.
2. And we cant make checkbox DEPENDENT FIELD.
Tabs in classic version
Tabs in lightning experience
Forms
Creating custom object and
custom tabs
These depend on the requirements like
this
DONE CREATING CUSTOM OBJECT
1. Default ON :- whenever Default is
ON it is placed on the navigation bar.
2. Default OFF :- not placed on nav
bar instead it will be shown on
Tab hidden : tab wont be accessible.
Multitenant
Architecture
Definition: Multitenant architecture is an app development model that
allows multiple customers (tenants) to share the same infrastructure and
application while keeping their data separate and secure.
Example: Imagine your company, "Acme Corp," is using Salesforce to
manage its sales processes. Other companies, like "Beta Inc." and
"Gamma LLC," also use Salesforce. Despite all three companies sharing
the same Salesforce infrastructure, their data and configurations are kept
completely separate. This sharing of resources reduces costs and
simplifies updates because Salesforce can update the software for all
users at once.
Meta Deta Driven development
Model
Metadata as Blueprints: Think of metadata as a detailed
blueprint. Instead of hardcoding every single detail into the
app, you define how things should look and behave using
metadata. This blueprint includes rules, structures, and
behaviours for the app.
For example, if you're building a recruiting app on Salesforce:
Fields: You define candidate details like name, email, and
position in the metadata.
Validation: You set rules like "email must be valid" or
"name cannot be blank" in the metadata.
Primary Key and Foreign key
Each table in a relational database has a field in which the data value uniquely identifies the
record. This field is called the primary key. The primary key is one part of what defines the
relationship; the other part is the foreign key. A foreign key is a field whose value is the same
as the primary key of another table. You can think of a foreign key as a copy of a primary key
from another table. The relationship is made between two tables by matching the values of the
foreign key in one table with the values of the primary key in another.
Primary and foreign keys are fundamental to the concept of relationships because they enable
tables to be related to each other. As you begin building your app, you won't really need to
think too much about primary keys and foreign keys. The important concept to understand
here is that in a relational database, objects are related to each other through the use of
common fields that define those relationships.
Custom formula Fields
Formula Field
When Calculated: Formula fields are calculated in real-
time whenever the record is queried or displayed.
After Record Insert? Formula fields are not stored in the
database; they are recalculated dynamically every time you view
or reference them.
Example:
If a formula calculates Total Price = Quantity * Unit Price , it will
always show the updated result, even if the related fields are
changed after record insertion.
Validation Rule
When Enforced: Validation rules are evaluated before a record
is saved (either when inserting or updating).
After Record Insert? No. Validation rules only run before
saving a record. They do not trigger on already saved records
unless you attempt to update them.
Example:
If a rule ensures that Discount <= 20%, it will block the record from
being saved if the condition is violated. However, it won’t
recalculate or enforce the rule after the record is inserted unless
edited again.
Key Differences:
Feature Formula Field Validation Rule
Timing Calculated in real-time on display Enforced before saving a record
Trigger After Insert? Yes, every time it is displayed No, only on record creation/update
Purpose To calculate and display values To enforce data integrity
How to create a custom formula
field
1. Click Setup ➤ Build ➤ Custom Objects.
2. Click Position.
3. In the Custom Fields & Relationships related list, click New.
4. Select the Formula data type, and click Next.
1. In the Field Label field, enter Days Open.
2. Select the Number formula return type.
In this case, even though we're subtracting Date fields, we want to end up with just a
regular numeric value.
3. Change the Decimal Places value to 0, and click Next.
Now it's time to enter the details of our formula.
4. Click the Advanced Formula tab, as shown in the following screenshot.
5. And put the following syntax according to it.
Formula field example
City, state, country we want to show like this
We use formula field
And to store picklist field we put picklist field inside the
text function like this
and formula field is only read only.
The more number of formula fields the
greater the impact
Modified formula field
Single and (&) is used to
concate where && is AND
operator Nd text function is
used to convert Numbers to
text
Giving Fields Dynamic Defaults
values
1. Click Setup ➤ Build ➤ Custom Objects.
2. Click Position.
3. In the Custom Fields & Relationships related list, click Edit
next to the Hire By
field.
4. Next to the Default Value text box, click Show
Formula Editor.
Look familiar? This is the same editor that we used to
define our Days Open custom formula field.
5. From the Functions list, double-click TODAY.
6. From the Insert Operator drop-down list, choose
Add.
7. Type 90.
Your default value formula should be:
TODAY() + 90
8. Click Save.
It will show by default like today () + 90 in hiring
manager field.
Introducing Validation Rules
To ensure the data entered into the fields of the Position
object is accurate and meaningful, we can establish a
few simple rules:
1. Field Validation: Each field should accept only the
type of data it’s meant to store. For example, a salary
field should only accept numerical values, and a
position title field should accept text.
2. Required Fields: Some fields might be
mandatory. For example, the job title, department, and
job location should not be left blank.
3. Data Format: Certain fields should follow a
specific format. For example, dates should follow a
standard date format (e.g., MM/DD/YYYY), and email
addresses should have the correct email structure (e.g.,
name@domain.com).
4. Value Ranges: For fields like salary or years of
experience, we can set acceptable ranges. For
example, the salary field should only accept values
between $30,000 and $200,000, and the years of
experience field should accept values from 0 to 40.
5. Unique Values: Some fields might require unique
entries. For instance, the job ID should be unique for
each position to avoid confusion.(PRIMARY KEY)
2nd example : -
1. No validation no data in fields is called bad
data, to prevent bad data.
2. Phone number validation , email validation ,
required field validation , Zip code validation.
Creating a validation to validate bad
data in record
Starting with name : if name contains test keyword
then show the error.
1. Go to Employee object and click validation rule
2. Click new
3. Define validation rule
4. When record create or update then validation
rule works.
Next employee cannot contain employee or test.
2nd validation rule [don’t use
this]
Name cannot contain the keywords “test & employee”
only when we are creating the new record.
Validation Rule
1. Field Required : - -
Blank concept comes in string and null comes in
number field.
Isnull() supports number field.
Isblank() supports number and text.
This make field required.
2. ISPICKVAL : -
3. Works with picklist fields.
Example : - 1st case
If opportunity stage name is qualification then
amount > 15k
It is not the best practice to use text function when
using picklist field instead we use ISPICKVAL()
This function takes two parameters : -
In our case it is stage Name and qualification
2nd case
Stage name should be “qualification” || “need analysis” ||
“Value proposition”
&& amount >=15k
3 . Case
Used in text field, number field , picklist field.
Ek hi field me ek se jaada value pe kam krna hogaa
Same example
Stage name should be “qualification” || “need analysis” ||
“Value proposition” || “Prospecting”
1 == true , 0 == false
if value is not equal to any of these
numbers then it will return false.
4 . ISCHANGED()
To find the changes in the stage field we use ISCHANGED
function
Some limitation are there examples we can use text , number
and percentage
And can’t use text area.
Example: - if opportunity stage name is closed lost then the lost
reason should be populated.
5 . IsPriorValue()
Tells/Returns the previous value of fields.
Used in Case of Update Operation.
Example : - if opportunity stage name is Prospecting then we
save and then we cant change stage name to “CLOSED LOST ”
|| “Closed WON”.
Check if stage is Changed. &&
Check if stage is Changed to Closed Won || Closed Lost.
&&
Check if the Previous value of Stage field is Prospecting.
Example Scenario:
1. Initial Stage:
o You have an opportunity that is currently in the
"Qualification" stage.
2. Stage Change to "Closed Lost":
o You decide that this opportunity will not be
successful, so you change its stage to "Closed Lost."
3. Restriction Explanation:
o Once the opportunity is marked as "Closed Lost," it
cannot be directly changed to "Closed Won" or back
to "Closed Lost" from any other stage without going
through another stage in between.
Why This Restriction?
Logical Sales Process: This ensures that your sales
process is logical and follows a step-by-step progression. It
prevents jumping directly between end stages without
following a proper path.
Step-by-Step Example:
1. Opportunity Stages:
o Stage 1: Qualification
o Stage 2: Needs Analysis
o Stage 3: Value Proposition
o Stage 4: Closed Lost
o Stage 5: Closed Won
2. Scenario:
o You have an opportunity in the "Qualification" stage.
o You move it to "Needs Analysis" and then to "Value
Proposition."
o You decide the opportunity is not going to be
successful and move it to "Closed Lost."
3. Changing Stages with Restriction:
o Now, the opportunity is in "Closed Lost."
o You cannot change it directly to "Closed Won" without
moving it to another stage first, like back to "Needs
Analysis" or "Value Proposition."
o Similarly, you cannot change it back to "Closed Lost"
directly without moving it to another intermediate
stage.
Visual Representation:
Allowed: Qualification -> Needs Analysis -> Value
Proposition -> Closed Lost -> Needs Analysis -> Closed
Won.
Not Allowed: Closed Lost -> Closed Won.
Not Allowed: Closed Lost -> Closed Lost.
Summary:
Closed Lost: Once an opportunity is in "Closed Lost," you
must move it to an intermediate stage before changing it
to "Closed Won" or back to "Closed Lost."
Reason: This maintains a logical sales progression and
prevents direct jumps between final stages.
6. Date & Time
For example : - To add a date in particular date
Lets say opportunity closed date can’t be less than 30 days or
after 30 days.
Field with datatype date
Field with datatype Date Time and we want to compare it.
Date is converting to date time value
Relationship in salesforce
Relationship
In a Salesforce app, a relationship is like a connection
between two pieces of data, much like a friendship
between two people. These connections are crucial
because they allow different parts of your app to talk to
each other.
Imagine you have two objects in your app: Position
and Job Application.
Without relationships: You can store all the
details about a position and all the details about a
job application separately. But you can't see how
they're connected. You can't see which
applications are for which position.
With relationships: You can link a position to all
the job applications for it. Now, when you look at a
position, you can see all the applications submitted
for it. Similarly, when you look at a job application,
you can see which position it's for.
So, relationships let you connect different pieces of
data, making your app more organized and useful. It's
like inviting people to a party and making sure they can
interact and get to know each other.
Lookup and master detail
relationship in salesforce
Lookup : - Used to connect two objects with each other
in parent to child fashion
Lookup field will always be on the child object. For
example company is the parent and employee is
the child
One parent can have multiple child
We start by selecting datatype in child object and
then select lookup relation and then select the
parent in related to option
If parent record get deleted child record will remain
on salesforce. Only field will get cleared.
Company(This will get cleared in employee record.)
-> Employee
Only lookup field will get cleared on child record.
In recycle bin record can last up to 15 days
What it does we cant delete the company if there
employee already in there.
We have to first delete the employee record then
we can delete the company.
We not use lookup to make external object child.
2. Master detail : -
Used to connect two objects with each
other in parent to child fashion
Lookup field will always be on the child
object. For example company is the
parent and employee is the child
One parent can have multiple child.
Parent child will always be required on the
child object i.e child cannot exist without
parent.
For example:- in lookup if company gets
destroyed then employee can still exist
but not in master detail.
If we delete the parent then we not see
child in recycle bin. And if we restore the
parent the child record also get restored.
When you have a Master-Detail
Relationship between objects, the child
object records do not have their own
owner. Instead, their ownership is always
derived from the parent record in the
master object.
Example Records:
1. Account Record:
o Name: ABC Corp
o Owner: John Doe
2. Invoice Records:
o Invoice 1: Related to ABC Corp
o Invoice 2: Related to ABC Corp
If we want to reparent child record then we have to
enable a radio button
First Option will not come : -
Child (Invoice)
Go to child object setting and select customer
Check this.
And the pencil icon will come
Can child have thier own owner
in lookup
Yes, in a Lookup Relationship, the child records can
have their own owner. Unlike a Master-Detail
Relationship, where the ownership of the child record
is determined by the parent, a Lookup Relationship
keeps the child record independent in terms of
ownership.
Key Differences:
1. Lookup Relationship:
o The child record maintains its own owner field.
o Ownership and sharing of the child record are
independent of the parent record.
o Deleting the parent record does not
automatically delete the child record (unless
you explicitly enable this option during the
relationship setup).
2. Master-Detail Relationship:
o The child record does not have its own owner.
o Ownership of the child is inherited from the
parent.
o Deleting the parent automatically deletes the
child records.
Example Scenario
Objects:
1. Account (Parent object)
2. Contact (Child object)
Relationship:
The Contact object is related to the Account
object via a Lookup Relationship.
Example Records:
1. Account Record:
o Name: ABC Corp
o Owner: John Doe
2. Contact Record:
o Name: Jane Smith
o Related to: ABC Corp
o Owner: Mary Johnson
In this case:
The Account record is owned by John Doe.
The Contact record is owned by Mary Johnson.
Access to the Contact record is determined by
Mary Johnson's sharing rules and access levels,
independent of the ownership of ABC Corp.
Interview Questions ? ?
Can we make MasterDetailRelationship in an object in
which records already exists ?
For example : if invoice a custom objects has already
contains records then we can’t create master detail
relationship.
To fix this :-
Create a lookup field on that object and populate the
records and then go to accounts and change field type
to master details.
Customer
Employee
Lead is the only object which neither can t be master or
child of a object in case of master Detail relationship.
Go to a custom object and create master … (u will not
be able to create it) but u can in lookup
- Junction Object (Many to Many
Relationship)
Self-lookup : - [lookup with same object] lookup
with same object.
- Company with child company
- Example in company object create a lookup field
with Parent company.
- Used to create a hierarchy relationship.
Why lookup not master detail?
For example if we firstly create amazon.com then it
required a parent company and amazon don’t have a
parent so that’s why we didn’t use master detail. And
that s why we don’t make master relationship in master
detail.
Amazon.com
- Amazon Air
- Amazon private airport - India
Hierarchy Lookup/Relationship :-
Special lookup field and available in user object.
For example : - make a senior manager hierarchy
lookup field in user object.
Let's create an example where we want to set up a
hierarchical relationship to track which users report to
whom in an organization. We will create a "Manager"
field in the User object to represent this relationship.
Step-by-Step Guide
1. Setup:
o Log in to Salesforce.
o Click on the gear icon in the top right corner
and select "Setup".
2. Navigate to Object Manager:
o In the Quick Find box on the left, type "Object
Manager" and select it.
o In Object Manager, type and select "User".
3. Create a New Field:
o In the User object, go to "Fields &
Relationships".
o Click "New" to create a new field.
o Choose "Hierarchical Relationship" as the data
type and click "Next".
4. Define Field Details:
o Field Label: Manager
o Field Name: Manager (auto-populated)
o Description: This field represents the user's
manager.
o Help Text: Select the user's manager from the
list of users.
o Click "Next".
5. Set Field-Level Security:
o Choose the profiles that should have access to
this field. For example, make it visible to all
profiles.
o Click "Next".
6. Add to Page Layouts:
o Select the page layouts that should include
this field, typically "User Layout".
o Click "Save".
How It Works
After setting up the Manager field:
Assigning a Manager:
o When creating or editing a User record, you
can now select a manager for that user from a
lookup of existing users.
o For example, if John Doe is a user, you can edit
his user record and select Jane Smith as his
manager.
Viewing the Hierarchy:
o The hierarchical relationship will allow you to
see the organizational structure.
o If Jane Smith is John Doe's manager, you can
see this relationship in both John Doe's and
Jane Smith's user records.
Real-World Example
Imagine a company called "TechCorp" with the
following structure:
CEO: Alice Johnson
o VP of Development: Bob Smith
Development Manager: Carol White
Developer: Dave Brown
o VP of Sales: Emily Davis
Sales Manager: Frank Green
Sales Representative: Grace Lee
In this example, we can set up hierarchical
relationships:
1. Alice Johnson (CEO) does not report to anyone.
2. Bob Smith (VP of Development) reports to Alice
Johnson.
3. Carol White (Development Manager) reports to Bob
Smith.
4. Dave Brown (Developer) reports to Carol White.
5. Emily Davis (VP of Sales) reports to Alice Johnson.
6. Frank Green (Sales Manager) reports to Emily
Davis.
7. Grace Lee (Sales Representative) reports to Frank
Gree
1. External Objects : - External database(obj,
tables, fields, records) that can be accessed by
salesforce.
Public External Objects:- Object that can be
accessed without authentication.
External object API name end with __x.
External object are accessible through External
object page.
Secure External Objects : - protected through
protocol.
Salesforce org to salesforce org.
0DATA 4.0 [OPEN AUTH]
0DATA 2.0 [OPEN AUTH]
External Objects and External
Relationship
Creating a external object
Go to home - > external data source -> new external data source -> then
do this settings
Then validate and sync
We can also make external object tab
Go to tab create a custom tab and in options we can select the
object. And append the tab to practice app.
1. External Lookup
- It is used to relate two external objects.
- Also used to related any standard or custom object
with external object.
- In case of standard and custom object the external
lookup field will be on standard or custom object.
- Also used to relate any standard or custom object
with external objects.
(this is for external object)
Diagram
External Order
|
Order detail
1. Click on external object [order-detail](child)
and create a external lookup field and in
related to click external order(parent).
2. In external column we have to find
that field that is common in both child
and parent.
And that is orderID
30:49
This is for standard object
In standard object only external objects are
shown in related to dropdown list.
We create an external relationship on account
object relates to external order.
In standard or custom object these will be child
and external object is parent. For example
account is child and external order is parent.
Indirect lookup in
salesforce
- Is used to relate any standard or custom objects with
external object.
In this the standard and custom object will be parent of
external object. [child]
For example :- External order [ child ] of customer [parent]
(custom object)
But if we do this it will not work to do work there are some
requirements we can do this
- Parent Child Requirement
Unique field should be presented in customer(parent) and
then go to child external order and create a indirect lookup
Lookup filters
A Lookup Filter in Salesforce is a feature used to restrict the values
available in a lookup field based on specific criteria. It ensures users select
only valid and relevant records in a lookup field, improving data accuracy
and reducing errors.
Example Scenario
Requirement: You have two objects, Account and Contact. Each
Contact should be associated only with Accounts located in India. To
achieve this, you can use a Lookup Filter on the Contact's Account Name
field to show only Accounts where the Billing Country is "India."
Steps to Create a Lookup Filter in Salesforce
1. Navigate to the Object Manager:
o Go to Setup → Object Manager → Contact.
2. Edit the Lookup Field:
o Find the Account Name field under Fields & Relationships.
o Click on Account Name to edit it.
3. Set the Lookup Filter:
o Scroll down to the Lookup Filter section.
o Click Edit or Add Filter Logic.
o Define the filter criteria:
Field: Account: Billing Country
Operator: equals
Value: India
o Optionally, set whether this filter is required (users cannot
bypass) or optional (users can bypass if necessary).
4. Add Error Message (if required):
o Provide a custom error message like: "Please select an
Account where the Billing Country is India."
5. Save and Test:
o Save your changes.
o Test the filter by creating or editing a Contact and using the
Account Name lookup. Only Accounts with Billing Country =
India will appear.
9 Cross object formula
field
- If we want to show parent object field in child
object
- Cross obj formula field is always on CHILD object.
For example : - A/c
|
Contact -> we want to show rating
fields of a/c in this .
We go to contact -> new field formula -> text->
formula
Contact A/c TEXT(Account.rating)
Roll up summary field
A Roll-Up Summary Field in Salesforce is used to calculate values from
related child records and display the result on the parent record. This field
is available only on objects that have a Master-Detail Relationship.
A Roll-Up Summary Field in Salesforce is used to calculate values from
related child records and display the result on the parent record. This field
is available only on objects that have a Master-Detail Relationship.
Example Scenario
Requirement: You have two objects, Account (parent) and Opportunity
(child). You want to display the total value of all closed opportunities on
the Account record.
Steps to Create a Roll-Up Summary Field
1. Navigate to the Object Manager:
o Go to Setup → Object Manager → Account.
2. Create a New Roll-Up Summary Field:
o In the Account object, go to Fields & Relationships → Click
New.
o Select Roll-Up Summary and click Next.
3. Define the Field Details:
o Enter the Field Label: Total Closed Opportunity Value.
o The Field Name will auto-populate.
o Select the Summary Object: Opportunity.
4. Define the Roll-Up Criteria:
o Summarized Field: Choose Amount.
o Roll-Up Type: Choose SUM (to calculate the total amount).
o Filter Criteria: Set conditions for the roll-up:
Field: Stage
Operator: equals
Value: Closed Won
5. Complete the Field Setup:
o Click Next and follow the steps to assign visibility and add the
field to page layouts.
o Click Save.
How It Works
Result: The Account record will now display a field, Total Closed
Opportunity Value, showing the sum of the Amount field from all
Closed Won Opportunities related to that Account.
Example:
o Account: ABC Corporation
o Related Opportunities:
Opportunity 1: Amount = ₹100,000, Stage = Closed
Won
Opportunity 2: Amount = ₹50,000, Stage = Closed Lost
Opportunity 3: Amount = ₹200,000, Stage = Closed
Won
o Roll-Up Summary Field on Account: ₹300,000 (100,000 +
200,000).
Would you like assistance setting up this field in your Salesforce org?
Introducing Page
Layouts
What is a Page Layout?
A page layout controls how fields, sections, buttons, links, and related
lists are arranged on a record's detail and edit pages in Salesforce. It
helps make the page look organized and easy to use.
Page layouts works with record types.
Default record type. [MASTER]
Why Customize Page Layouts?
Right now, all the fields on your Position object might look messy and hard
to scan. For example, long text areas might be at the top, making it
difficult to quickly see important information.
What Can You Do with Page Layouts?
Rearrange Fields: Move fields around to make the page easier to
read and use.
Control Visibility and Editability: Decide which fields users can
see, edit, or must fill out.
Read-only: Users can see the field but can't edit it.
Hidden: Users can't see the field at all on this layout, but they
can still access it through reports or the API.
Required: Users must enter a value in this field.
Page Layouts and Security: Even if you hide a field on a page
layout, users might still access it through other means like reports
or API. Page layouts are for user convenience and organization, not
for security.
Clicking the gear icon and then click on detail page will show
each separate section in object. For example : -
From page layout we can make field required
Lock = Read only field
Salesforce admin can edit read only fields except formula fields
and rollup summary fields.
Read only options : -
Page layouts and field definitions
In classic buttons are controlled by 2nd
option and in lightning in 3rd option.
Compact page layout
How our field show in this part is called compact
page layout and is called highlight panel.
And it is through compact layout.
Only one primary layout.
And system default we cant change.
Creating
But this layout is not assigned our company is still
using system admin default layout.
We have to click on compact layout assignment btn
and switch from
system admin to company layout.
BEFORE switching to company layout
AFTER switching to company layout
Note only the first field will be shown under
object name
Suppose we want to add more fields in
related list in employee
Only the first four field will be shown.
List Views
CASE 1
We want to show some extra fields in this object click on setting icon and
select field to display
Now we want the customer who country is India.
CASE 2
1. Create new list view and then we see all the customer
with name field.
2.
3. If we filter by my customers then we see the records
that we create and can’t see other users customer
record.
4. Select to all customers we see the records available in
all users then we want the customer whose country is
India and click on add filter.
CASE 3
Suppose we want the customer that are created today/ or previous week/
customer that are related to India or specific Country.
WE CHOOSE THE FIELD CREATED DATE AND BASE ONT HAT APPLY THE
FILTERS.
Custom list views
ONE THING WE NOTICE THAT WHEN WE CLICK THE CUSTOMER
TAB WHEN IT PUCHES BACK TO RECENTLY VIEWED.
OUR REQUIREMENT IS WHEN WE CLICK WE WANT THE DESIRED
CUSTOM LIST FIELDS.
Simply we have to click the list and click on pinned list.
IMPORTANT NOTE : - We can’t apply the filter if we apply the
filter on customer object , employee is the child of customer
CUSTOMER (filter on this related list field does not inherit )
||
EMPLOYEE
Suppose in future a requirement came where we want to apply
the filter based on parent object.
Then we make cross object formula field which will store the
parent object information.
Kanban view says if we have a picklist field which has multiple
value and want to see the record of particular value.
And we want to change the employee country we can simply
drag and drop.
We can add chart
Salary by country
Schema Builder
- If we want to see our which object is related
to which object.
- Display Relation Between Objects
Changing properties can we change in by clicking
the settings icon.
For standard object
- Can modify the custom object and custom
field information
- From Schema builder we can build objects.
Example : - go to element tab and drag and
drop.
- Can Create new objects and new fields inside
custom or standard object.
Interview question
From schema builder what can we change
in standard object ?
- Can not modify the standard object
information and standard object field but we
can modify standard object custom fields.
Difference between standard and
system objects
Aspect Standard Objects System Objects
Predefined objects provided by Internal objects used by Salesforce for system
Definition Salesforce. functionality.
Account, Contact, Lead, Opportunity,
Examples Case. User, Profile, Permission Set, Setup Entity.
Used for common business entities Used for managing the Salesforce platform an
Usage and processes. its configurations.
Customizabili Can be customized (fields, layouts, Limited customization; mostly managed by
ty relationships). Salesforce.
Visible to users based on Generally not visible or directly interacted with
Visibility permissions. by end users.
Facilitate CRM and business
Purpose operations. Ensure platform functionality and security.
Explanation
Standard Objects: These are the objects you use for everyday
business tasks, like managing customers (Accounts), tracking
potential sales (Opportunities), or handling customer support
(Cases). They can be customized to fit your business needs but
come with predefined fields and settings that are typical for most
businesses.
System Objects: These objects are essential for the behind-the-
scenes operation of Salesforce. They handle system settings, user
management, security settings, and other platform functionalities.
Users typically don't interact with these objects directly, and
customization options are limited as they are critical to the overall
operation of Salesforce.
External ID (Improve the
performance of search
operations)
In Salesforce, the difference between checked
and unchecked External IDs primarily affects how
the field is treated in terms of indexing,
searchability, and data operations. Here's a
breakdown:
1.Checked External ID:
o Indexing: The field is indexed, which
improves the performance of search
operations and SOQL queries involving
this field.
o Uniqueness: The values in this field are
ensured to be unique across records. This
is similar to the behaviour of a primary
key in a database.
o Searchable: Users can search for
records using this field directly from the
sidebar search.
o Data Import and Integration: This
field can be used for matching records
during data imports or integrations.
When performing an upset operation,
Salesforce uses this External ID to
determine whether to update an existing
record or insert a new one.
2.Unchecked External ID:
o Indexing: The field is not indexed, which
may result in slower search operations
and SOQL queries involving this field.
o Uniqueness: The values in this field are
not guaranteed to be unique. Multiple
records can have the same value in this
field.
o Searchable: The field is not searchable
from the sidebar search.
o Data Import and Integration: This
field cannot be used for matching records
during data imports or integrations. It
won't be utilized in upsert operations for
determining whether to update or insert
records.
In summary, a checked External ID field provides
indexing, ensures uniqueness, improves
searchability, and facilitates data import and
integration processes. An unchecked External ID
field lacks these benefits, making it less efficient
for search and data operations.
For example, in your Candidate object, setting
the First Name, Last Name, and Email fields as
checked External IDs ensures that these fields
are indexed, searchable, unique, and useful for
data import and integration. If they were
unchecked, you wouldn't have these advantages.
Chapter – 7
Security and sharing
data
Data access concepts
1. Object level Security
2. Field level Security
3. Record level Security
Object Level Security
Ways to Control Data in Salesforce
1. Object-Level Security:
What It Does: Think of objects as big folders that hold different
types of records, like "Positions" or "Reviews."
How It Works: You can control if someone can see, add, change, or
delete anything in these big folders.
Example: If someone shouldn’t see any reviews, you can hide the
entire "Reviews" folder from them.
Where It’s Set: These controls are set up in something called user
profiles.
A profile in Salesforce is a set of rules and settings
that determine what a user can do within the
system.
Profiles control:
1.The objects the user can view, create, edit, and
delete
2.The object fields the user can view and edit
(more on that later!)
3.The tabs the user can view in the app
4.The standard and custom apps the user can
access
5.The page layouts a user sees
6.The record types available to the user.
7.The hours during which the user can log in to
the app
8.The IP addresses from which the user can log in
to the app
9.Apex Classes, Connected Apps, vf pages.
Simplified Explanation:
Imagine you're managing a company in Salesforce with
two types of users: Sales Representatives and HR
Managers.
Sales Representative Profile:
o Can access Accounts, Contacts, and
Opportunities objects.
o Can create and edit opportunities but only
view salary data.
o Can access the "Sales" app and related tabs.
HR Manager Profile:
o Can access Employee Records and Salary
Details objects.
o Can create, edit, and delete employee records
but cannot access sales data.
o Can access the "HR" app and related tabs.
I go to system admin profile and I am system admin
and I unchecked a app to become not visible.
Default off means tab will hidden from navigation
bar but it will appear on home search bar
Two types of profiles are available : -
Permission Sets
Permission set is used to extend the Permission of a User that
is provided at Profile Level.
1.To give extra permission to
object/field/APP/TAB/RECORD/APEX CLASS.
2.More than one permission set can be
assigned to users.
3.For example : -
4.I can assign 1 permission set to 10 different
users.
5.Or I can assign 10 permission set to 1 users.
When it is used ?
For example : - Student object fees ❌ 👁️teacher
Student__c Custom Field
- HOD – Read
- Dean – Read
- Admission Team – Edit/Read
- Director – Edit/Read
Tab default off meaning tab will not be
visible in navigation and available in app
launcher / explorer.
Admin profile r not given to users given
to admins only. {standard profile}
When set to default then, we open the app this app will open.
Note : - when making permission sets, the
profile user licence should match the profile
licence in permission set .
When making permission sets
Profile user license === permission set
If we given delete permission from profile
then we can’t edit from permission set.
What is difference between view all data
and modify all data and what is difference
between view all and modify all ?
Field-Level Security
What It Is: Imagine each object (like "Position" or
"Candidate") is a form with many fields (like "Name",
"Salary", "Social Security Number"). Field-level security
lets you control who can see or change each field on
the form.
How It Works:
Those * denotes field level security.
Hiding Sensitive Info: You can hide important
details, like someone's salary or social security
number, without hiding the whole form.
Example: If someone shouldn’t see the "Salary"
field on the "Position" form, you can hide just that
field from them.
If u set field level security for a specific profile lets
say hiring manager then users of that profile can
see it others cannot except system admin.
Record-Level Security
What It Is: Record-level security controls who can see
or do things with specific records (entries) in
Salesforce. It's like having a bunch of individual folders
(records) within a big file cabinet (object), and deciding
who can look at or change each folder.
Example
Interviewer: Can only see and edit their own
interview records.
Hiring Manager: Can see all records related to
positions they are responsible for but not others.
Recruiter: Can see and edit all candidate records.
Profiles are like circles, whereas roles are arranged into a hierarchy (when
using the Role Hierarchy):
Permission set group
- Collection of Permission sets for specific
functionality
Example : -
Login IP(I.P Address) ranges
We add login ip range to restrict the user so the user
can only login from office premises to increase the
security of salesforce org.
Login IP ranges will always add on profile.
Suppose my address is : - 49.36.188.90 and we don’t want user to login from
any other I.P address
1.Don’t add login IP ranges to system admin
2.We put login ip ranges to restrict the users
so the users can only login from the office
premises or the client has access it
3.To increase the security of salesforce org.
Changed the login ip for Josephine user
Checked and then save
We change the login ip address of Josephine to different
address that’s why she can’t login.
LOGIN HISTORY
- Used for audit purpose
- Tell us the history of the user login
Login hours
- To restrict the login for specific hours and is in
profile level.
- To restrict the user to login into salesforce from
outside the company working hours ( 9 to 5 job) if
that time increase that means u r outsourcing your
work.
This means User can login in any hour
Flow of login hours
Network Access
Login I.P : - If the user is not within the IP then the user
can’t login
Scenario 1: Outside Network Access Range
1. Network Access Range: 192.168.1.0 to 192.168.1.255.
2. User's Profile Login IP Range: None specified.
User attempts to log in from IP address 192.168.2.50:
Since 192.168.2.50 is outside the trusted Network Access range,
Salesforce will prompt the user to enter a verification code sent via email
or SMS.
Scenario 2: Inside Network Access Range but New Device
1. Network Access Range: 192.168.1.0 to 192.168.1.255.
2. User's Profile Login IP Range: None specified.
User attempts to log in from IP address 192.168.1.100 using a new
device:
Even though the IP address is within the trusted range, Salesforce might
still require verification if the device is not recognized. The user will be
prompted to enter a verification code.
Scenario 3: Inside Login IP Range but Outside Network Access Range
1. Network Access Range: 192.168.1.0 to 192.168.1.255.
2. User's Profile Login IP Range: 192.168.1.100 to 192.168.1.200.
User attempts to log in from IP address 192.168.1.150:
The IP address is within both the Profile Login IP Range and the Network
Access range, so no verification code is needed.
User attempts to log in from IP address 192.168.1.250:
The IP address is within the Network Access range but outside the Profile
Login IP Range. The login attempt will be denied due to the Profile Login IP
Range restriction.
Scenario 4: No Login IP Range and Outside Network Access Range
1. Network Access Range: 192.168.1.0 to 192.168.1.255.
2. User's Profile Login IP Range: None specified.
User attempts to log in from IP address 203.0.113.50:
Since 203.0.113.50 is outside the trusted Network Access range,
Salesforce will prompt the user to enter a verification code.
General Rule for Verification Code Prompt
A verification code is required when:
The login attempt is from an IP address outside the Network Access range.
The user is logging in from a new device or browser that Salesforce does
not recognize, even if the IP address is within the trusted range.
The user is logging in from an IP address that is not included in the Profile
Login IP Range, if specified, and the organization's security settings
enforce such checks.
Steps to Avoid Verification Code Prompt
1. Ensure IP Address is within Network Access Range:
o Add the IP range to Network Access to mark it as trusted.
2. Familiarize Devices:
o Encourage users to complete the verification process on frequently
used devices so they are recognized in future logins.
3. Specify Login IP Ranges for Profiles:
o Ensure the login attempts are from IP addresses within the allowed
range for the user’s profile.
### Steps to Set Up:
1. **Set Login IP Ranges for Profile**:
- Go to **Setup** ➔ **Profiles**.
- Select the profile to which you want to add IP restrictions.
- Add the IP ranges under the **Login IP Ranges** section.
2. **Set Network Access**:
- Go to **Setup** ➔ **Security** ➔ **Network Access**.
- Add the trusted IP ranges.
By configuring both settings, you ensure users can only log in from specific IP
ranges and can benefit from reduced verification steps when accessing from
trusted network ranges.
how many type
developer org in
salesforce
Salesforce offers several types of developer
environments, commonly referred to as "orgs"
(short for organizations), each tailored for
different purposes. Here are the main types:
1.Developer Edition: (Code)
o Purpose: Ideal for learning and
development.
o Features: Provides most of the
Salesforce features, including access to
Apex, Visualforce, and Lightning
components.
o Limits: Limited storage and data
capacity compared to production orgs.
o Use Case: Learning, experimentation,
and small-scale app development.
2.Developer Sandbox:
o Purpose: Used for development and
testing in an isolated environment.
o Features: Copies of your production
environment, but with limited data and
storage.
o Types:
Developer Sandbox: Basic sandbox
with limited data storage.
Developer Pro Sandbox: More
storage than a Developer Sandbox.
o Use Case: Development, testing, and
training without affecting production
data.
3.Partial Copy Sandbox:
o Purpose: Used for development, testing,
and training.
o Features: Contains a subset of your
production data and metadata.
o Limits: Includes a sample of your data,
but not a full copy.
o Use Case: Testing with a realistic sample
of data.
4.Full Sandbox:
o Purpose: Used for performance testing,
load testing, and staging.
o Features: A complete copy of your
production environment, including all
data and metadata.
o Limits: Typically has the same limits as
your production org.
o Use Case: Comprehensive testing and
quality assurance.
5.Scratch Orgs:
o Purpose: Temporary Salesforce
environments used for development and
testing.
o Features: Created and disposed of
quickly, can be configured to contain
specific features and metadata.
o Limits: Short lifespan (days to weeks).
o Use Case: Agile development,
continuous integration, and testing.
Field Level Security
To protect sensitive fields like a candidate's social security
number in Salesforce without hiding the entire candidate
object, you can manage field-level security. Here's how it works
in simple terms:
Field-Level Security: Salesforce allows you to specify
which fields within an object (like Candidate) users can
view and edit. This means you can hide sensitive
information, such as social security numbers, from users
who don't need to see them.
Profiles and Permission Sets: You assign field-level security
based on user profiles or permission sets. Profiles define the
baseline permissions for different types of users (like Interviewers or
Standard Employees), while permission sets add extra permissions
as needed.
Setting Field Permissions: Within each profile or permission set,
you can specify whether users can see or edit specific fields. For
sensitive fields, you might restrict access to only certain profiles or
permission sets that require it, like HR staff who handle confidential
information.
Data Visibility: Even though the Candidate object exists, users
without permission won't see sensitive fields when viewing records.
This ensures that data protection is maintained without needing to
hide the entire object from users who need access to other parts of
the candidate's information.
BRACKET DENOTES FIELD LEVEL SECURITY
Controlling
Access to
Records (OWD)
Base level security for records.
Profile and permission set are base level security for objects and fields.
Public read only
Public read Write
Private
- Most restrictive
- If we make an object OWD to private, only record owner can
read/edit/delete/change owner of the record not other users.
- And The user is on the above in role hierarchy.
For example: -
Role always use with record level security
and role concept comes with OWD.
Same level can’t see each other records for
example installation and repair services can’t
see customer support records only COO can
see it.
For example : -
User Vernon right can’t access to student
records because student OWD is set to
private and user above the role hierarchy can
access it.
If we make a record in other user lets say
Harvey khan
Then that record will show up only in
system admin
Controlled by
parent
Will be available for the child/detail object in case of
master-detail Relationship.
For example if we our custom object and whose child is
invoice line item.
Master detail relationship Object
INVOICE (owd)
OBJECT ( Child )
( Invoice line item) {owd}
Controlled by parent(invoice) of invoice line item (child) and
we cant change the OWD for it.
It means parent access goes to child access in master detail
relationship.
In simple terms invoice line OWD will be controlled by
parent OWD.
Public Read/write
AVAILABLE FOR CASE AND LEADS
Org-Wide Defaults: These are the basic rules that
decide who can see and use the records in your Salesforce app.
Think of it as setting the privacy settings for your data.
Locking Down Data: We start by making the data as
private as possible. This means that, by default, users can't see or use other
people's records unless we say they can.
Types of Access:
Private: Only the person who created the record
can see and edit it.
Public Read-Only: Everyone can see the records,
but only the creator can edit them.
Example Scenario : -
Public Read/Write: Everyone can see and edit all
records.
Opening Up Access: After setting these basic rules,
we use other tools to share the records with the people
who need them:
Role Hierarchies: This is like an organizational
chart. People higher up can see and use the
records of people below them.
Sharing Rules: These are extra rules that let us
share records based on certain criteria. For
example, sharing all candidate records with the HR
department.
Manual Sharing: This lets us share specific
records with certain people or groups as needed
Group , QUEUE AND
MANUAL SHARING
QUEUE AND GROUP IN SIMPLE TERMS
Simple Summary:
Queue in simple terms
Key Points:
Multiple Librarians: Multiple librarians (users) have
access to the same pile of books (records) and can pick
any book (record) they want to process.
Single Ownership: Once a librarian (user) picks up a
book (record), they take sole responsibility for processing
it.
Simple Summary:
Book Return Desk: Central location (queue) for returned
books (records).
Librarians: Group of people (users) assigned to manage
the returned books (records).
Single Processing: One librarian (user) takes ownership
of one book (record) at a time and processes it.
1. Queue (Book Return Desk):
o Unassigned Work: Books (tasks) are unassigned
until a librarian (user) takes ownership.
o Individual Responsibility: Once a book (task) is
picked up, it is handled by one librarian (user).
Main Queue Example
- Can be record owner
Finance Team - 5 users (Queue)
Invoice of approval - Record Owner is
Queue
For example : How It Works:
1. Record Assignment to Queue:
o A financial record/object is placed in the
"Finance Team Queue."
o All 5 members of the Finance Team can see
this record in the queue.
2. Taking Ownership:
o One member of the Finance Team decides to
take ownership of the record.
o This member picks the record from the queue.
3. Responsibility Shift:
o Once the member takes ownership, the record
is no longer in the queue.
o The other 4 members of the team no longer
see the record in the queue and are not
responsible for it.
For example create a queue name Student_Queue
and in supported objects add student and in users
Josphine ray.
Then from admin in any record u see u can change
the owner to student queue and then uncheck the
box of send notification.
2. Public Group(for record
sharing only) (Library
Committee):
o Shared Access: All committee members (group
members) have access to the same information and
tasks.
o Collaboration: Members work together on shared
responsibilities.
1.For example : - Navigate to Public
Groups:
o Go to Setup.
o In the Quick Find box, type "Public
Groups" and select it.
2.Create a New Group:
o Click New.
o Group Label: Enter a descriptive name,
e.g.,
o "Student”
Add members Josphine ray and then save.
From admin on record of any object click
sharing button and then select public group
, search name student group.
That’s how you share records with group
Manual Sharing
Sharing Rule
Used for sharing the records with the user, roles,
public group of users.
Lead (potential customer, potential opportunity for
doing business with us)
Opportunity (deal in progress)
For example: -
1 . A lead come and whose country is India, and we
want to show this lead to those users who r of India.
2 . We make a field in Lead object whose name is
Region and whenever a lead come and whatever the
reason and based on the reason that lead will be
assigned to group,,
For instance lead reason is APAC
Types of sharing rules : -
- Criteria based sharing rule
Execute based on certain criteria.
A easy example
For example : - if student is updated or created whose
college email is not null or is current student is checked
then this record will get shared to public group(has a
user Josphine ray )
We can only create sharing rule if an object OWD is
read only or private
Go to student sharing rule
Questions related to sharing rule
Q.1 Can we share the record DIRECTLY to a user
using sharing rule ?
NO
From sharing rule we cant share records to
users/queue directly.
Q.2 Can we share the record to a user using sharing
rule ?
Yes using public groups
No when the question can we directly share the
records with user using group or roles
Q3 When can we create Sharing on any object ?
Though OWD
- Owner Based Rules : -
Base on record Owners
For example : -
Records created by CEO needs to be shared with COO,
CFO.
Records created by External users needs to shared with
certain internal users.
Criteria based rule
For example : - whenever the lead created based
on the lead region it will get shared
Lead created by ceo , region emer then it will get
shared to EMER group simple then all records
own by ceo will be visible to emer group users.
That is wired case
It means EMER group ke under kitne bhi users
hain aur voh joh lead record create krte rhenge
voh share hojayegene jiske ssath aap select
karoge..
Interview Questions
Lets say u r working for a company XYZ, ..
They have a requirement they want to
share the Lead Record whose company field
having some value with the 20 Different
role & 7 different public group can we do
this using a single sharing rule ?
- Guest Sharing Rule
1.Enabled only if there is Experience Cloud
Enabled.
2.Guest user access based on criteria.
3.It means a record that will be shown to guest
users.
4.Guest users don’t login but still we want to
share
Lightning Flows
Important note: - Work flow and flow builder are
depreciated.
Flows
With flows we can create, update, delete records,
With flow we can create screen, create emails and
creating tasks.
Different Types of Flows
Mainly two types of flows
- Screen Flows : - For example we have to create a student
Types of screen flow : - Only one type : - Screen flow
Record trigger flow works when there DML happens
Creating a flow
From two places where we can create flows: -
1. From setup home
2 .
Elements in Flow
Collection Filter
Resources in Salesforce Flow
Screen Flow
Screen flow
Input from user = screen flow
Case and contact have a lookup relationship
where case is the child and contact is
parent.
Contact
Case
Making a simple screen flow
Always debug the
flow
To add the flow in the home page
Click on edit page
Add the flow
We cannot modify the flow after it is
activated
To modify click on save as a new version
and make a new version
And the homepage will pick up the
latest activated version. And deactivate
the old one.
If we know the value have to be change in near future
that will make more flows to fix this we use custom
label.
Custom label is basically used to store static values.
Search customlabel in admin
To use in flow first we have to save as new version and
edit the welcome screen
And then go to resource picker label -> welcome
message
To change the owner click on edit label and then save.
How to take input from
flow
Input Components
- Picklist
- Lookup
- Radio
- Text, Name , Title
Picklist
We can create a picklist by choosing
option and then we can select the object
and choose the picklist.
- Lookup
Same case scenarios
When using fault path and to show error
message use this formula
Add this formula to fault path
Show success message
with record link
If clicked on the link
show open case details
whenever we want to associate a case id
that we want to pick up from detail page in
that case we first :-
1. Create a variable from the new
resource
2.
3. And then add the flow to page.
We created the case successfully
We can create quickly create case by adding
a new button using quick actions and then
add it to nav bar.
And then add it to layout.
When the record created we want to
navigate to that record page
Use this formula to navigate
Save the record id in call script.
And in the link
{!fmBaseUrl}lightning/r/Case/{!
Create_Case_Record}/view paste this.,
Store the object field value as it is from
the object and show in flow
Create a record variable
Go to input screen and delete all the
references and then in input screen go
to fields and in record variable
Reference the variable we created and
see all the fields values are coming.
And in reference variable refer the var
case record
And in call script variable refer the
variable.Id
Get Records and for loops
A company is implementing the solution where
we can edit the account address in those account
which don’t have either Billing address or
Shipping Address on account detail page
Transaction are rolled back to create account
Subject
Status
Description
Contact number
Contact email
Send Email using Lightning Flows
A new Lead {!$Record.FirstName} {!$Record.LastName} has been
assigned to You.
if opportunity status is closed won and if
opportunity status changed to closed
won from anything then we have to
create a task
Email Alerts
Email template is must.
Whenever a account is created, send a welcome email
1. Create a new email alert in salesforce UI
Error Logging
Framework
We can create record or we can send Email to user
- Auto-launched Flows
(No trigger)
1. From Screen Flows we can call
Flow with screens
2. From Record Triggered Flow we can call
Flow without screens
From record trigger flow we can’t call record triggered flow
This has to be called from reference ..
For example : - this auto launched flow can also be called from
screen flow, record triggered, platform event, scheduled flows,
record triggered orchestration.
Jb tk isko call nhi karege this will not work
In order to work this auto flow require an element.
- Scheduled Flows
Whose account is not active from last 30 days ,
change the active from yes to no
- Record Triggered
Flows
All record triggered flow works in rollback mode.
Record triggered flows are the automation process which
executes automatically, when there is any DML happens in
any object and these types of trigger do not require any user
intervention.
Types of DML
- Create
- Update
- Delete
Example :-
Scenario 1 : -
Whenever a record is created , by default its industry
will be set to Education.. and change the description
from “Updated from flow”.
Global Variable
-> $Record [All Fields]
Use assignment Operator
Use Update Triggering Account
Whenever the account is created post a
message to chatter.
Types of Record Trigger
flows : -
Record Triggered Orchestration ❌ (Not
used)
Async Trigger Flow : - this is basically used
when a action is happened after one second, 2
minutes .
For example : - whenever this student is created or
updated , then a mail should be sent one minute
after its update.
Before save flow V After save flow
(save krne se phelaa vs Safe krne ne baad)
Trigger ordering : -
Lowest value will be run first as it increases.
Suppose a 5th flow then we can reorder to
150 (5th flow)
In summary gives a space in ordering.
Means a big difference in re-ordering.
Send Email Using
Lightning Flows
Create a Record Triggered flow so that when a lead is
created then create a follow up task for that lead with
the following information : -
Subject : - Follow up with the Lead {!
$Record.FirstName} {!$Record.LastName}
- Description/ Comments : - a new lead {!
$Record.FirstName} has been created .
- Please Follow up with the lead and capture the
interest.
- Due Date – 3 days from today
- Name(Who) – Lead.id
- Status - New/Not Started
- Priority : - High
A new lead <Lead name> has been assigned to you.
Dear user ,
A new lead {!$Record.FirstName} {!
$Record.LastName} has been assigned to you.
Here are the more details about the lead
Name : - {!$Record.FirstName} {!$Record.LastName}
Email : - {!$Record.Email}
Company : - {!$Record.Company}
Industry : - {!$Record.Industry}
Status : - {!$Record.Status}
Regards ,
Panther School
Whenever we have to send email using html we have to
enable some certain settings
This is text email and to set TRUE to rich text
formatted body.
Nd set this settings.
If we have to send email without using Email template
use rich text formatted body , then we use a resource
text template.
When we select log on email and jis object pe hum
email bhej rhe hai and voh lead aur contact ke alava koi
aur hai toh voh related record ID me jayega and if they
are lead or contact then it will go to recipient ID.
Turn on the Recipient Id and fill it in record.id and turn
off the related record id when we have to send Email
using HTML and turn on those settings.
In summary
Recipient Id : - who ID as Record.id (when we have to
send in HTML)
Related Record Id : - Triggering record. leadId (not use
this)
For sending it to owner
What we use before safe flow / After save flow.
AFTER FLOW CASE : -
We need lead ID and after related tasks will be used.
BEFORE FLOW CASE : -
In this task will be created but without associating with
lead.
We can send a email whenever there a task created. Send
Email 23:50)
We can send using Send email alert or create a action.
----- Using Action
Quick Actions
Pre-built: These are standard email actions that come out-of-the-box with
Salesforce.
Location: Typically found on the record page layout as a button or link.
Functionality: Usually limited to sending a basic email to the record owner or a
specific email address associated with the record.
Examples: "Email This Case," "Email This Contact."
Customization: Minimal customization options, often restricted to the email body
content.
Custom Actions
User-defined: You create these actions to meet specific email needs.
Flexibility: Offers greater control over email content, recipients, and subject
lines.
Components: Include fields for recipient, subject, body, attachments, and email
templates.
Location: Can be added to record page layouts or used in other parts of
Salesforce.
Example: Create a custom email action to send a proposal to a lead with specific
proposal details.
Key Differences
Quick
Feature Custom Actions
Actions
Creation Pre-built User-created
Customizati
Limited High
on
Complexity Simple Can be complex
Basic email Specific email
Use Cases
needs requirements
Export to Sheets
In essence:
Quick Actions are a quick and easy way to send basic emails but lack
customization.
Custom Actions provide more flexibility but require additional setup and
configuration.
The choice between Quick Actions and Custom Actions depends on the specific email
requirements of your organization. If you need a simple email functionality, Quick Actions
might suffice. However, for more complex email scenarios, Custom Actions offer greater
control and customization.
Quick Action Example:
Object: Case
Quick Action: "Email Case Owner"
Functionality: When clicked on a case record, this action sends an
email to the case owner with a pre-defined subject and body. The
email content might include case details or a request for updates.
Custom Action Example:
Object: Opportunity
Custom Action: "Send Proposal"
Functionality: When clicked on an opportunity record, this action
opens a popup window to collect additional information like proposal
version, due date, etc. Once submitted, an email is sent to the
opportunity owner with a link to download the proposal.
Customization: The email subject and body can be dynamically
populated with opportunity details and proposal information.
Attachments: The custom action can also include functionality to
attach the proposal document to the email.
Key Differences:
The "Email Case Owner" quick action is a standard option with
limited customization.
The "Send Proposal" custom action offers greater flexibility in terms
of email content, recipients, and additional actions.
Next Scenario : -
If Opportunity status is Closed Won and opportunity status is changed to anything
Then we have to create a task in opportunity that status is changed from closed won.
New task is created when old status is closed won and new status is not closed won
Object it should be created on will be : - Opportunity.
Event : - Update
TriggerType : - After save flow
Requirements
New stage != Closed won
Old stage == Closed won
Changed from closed won to payment pending.
This example will not work
Send Email using email alerts
Requirements for email alerts
- Email Template is must
- Workflow Email alert i.e is using Email Template for the
object.
- Use Email alert in flow
$Record.Id
Send email using email templates id
To do later…
Introduction to
approval process
When we have to approve a record from our seniors we use approval process
Required for approval process
Email Templates
Approval Assigned :
1. Email will be send to user to which the approval is assigned.
2. Approval Approved : - Send to record owner
3. Approval Reject : - Send to record owner that my record is
approved or not.
Simple Approval Process
Pre- Requisite
Discount field on Opportunity
Discount Status Picklist field on Opportunity
Scenario:
When we are dealing with a contact who does business with us and is
purchasing our products or services, they might request a discount. For
example, if the customer is spending $10,000, they may ask for a 3% discount.
In such cases, we submit the discount request to our manager for approval. If
the manager approves the discount, we will provide it to the customer. If not,
the customer will not receive the discount.
This situation is a perfect use case for an approval process in Salesforce. The
approval process will automate the workflow, ensuring that any discount
requests are reviewed and approved by the manager before being granted to
the customer.
Explanation:
Initiation: The approval process starts when a customer requests a
discount.
Submission: You submit the discount request to your manager through
Salesforce.
Manager’s Decision: The manager reviews the request.
o If Approved: The discount is applied to the customer’s purchase.
o If Rejected: No discount is given to the customer.
This approval process ensures that discounts are only given after proper review
and authorization, maintaining control over financial decisions.
Recalled
In Salesforce, "recalled" typically refers to the status of a record that has been
previously activated but is now deactivated. This means that the record is no
longer visible or accessible in the system unless it is reactivated.
Here are some common scenarios where you might encounter the "recalled"
status in Salesforce:
Leads and Contacts: A lead or contact might be recalled if it is
determined to be inactive or irrelevant.
Step 1 : - on home search approval process
Jump Start: A pre-made package that gets you started quickly.
Standard Setup Wizard: A tool that lets you build your organization from
scratch.
Step 2 : -
Select the object
Opportunity and Select Use Standard Setup Wizard
Step 3 : -
Then Create a lightning Email Template
Approval Assigned Template
Then Click on standard Setup Wizard
And then create the Approval Process
And then create the criteria discount field should not be blank
Next
Now update the fields from the approver page
In this select Atul Sharma as Manager
And from User page make atul sharma as manager and select only If I am an
approver.
FINAL
Multi-Step Approval
Process
Scenario :-
Calling approval process from flow
Clone the single approval Process and name it Multistep approval process
2 Go to Approval steps and Create the first criteria
And then create a new approval process and set the criteria
In this we have to update the field
Reports and
dashboards
Report: Ek sales manager chahta hai ki uske team ne kal kitne phone
calls kiye. Report banane se usko list milti hai - jaise, "Amit ne 10 calls
kiye, Priya ne 15 calls kiye, total 25 calls."
Dashboard: Isi data ko dashboard pe ek pie chart mein dikha sakte
hain - Amit ka 40% (10 calls) aur Priya ka 60% (15 calls). Ek nazar
mein manager ko pata chal jata hai ki kaun zyada active tha.
- Tabular reports
Creating a folder and then sub folder
Type on search -> Reports -> make a folder
Case MGT
2 Create a new Folder AMER Cases .
1. To create a report a Report type is very important
Report type (template)
Which object or related object fields we can take to our reports
Report Type -> Object (Fields) -> Related Objects (Fields)
For making reports we need report types and for dashboards we
need reports
After Reports are Created , Add fields to reports
By double clicking to any fields we can add fields to the reports
Private reports
Only accessible to me not to any other users.
Saving case report to AMER
CASES FOLDER.
Applying filter where we want to show open cases
And hit run
TABULAR FORMAT REPORT
Summary/ Row Level Grouping (One level
grouping / Row level Grouping)
Requirement
Show all cases by status (new , in-progress , working, escalated)
In New Cases WE have 15 and in Working we have 1
Once we add Grouping , then we can add Chart
Example Clone the case report -> Add Group
Group by status
Add chart and then hit save and run
And if we want to see specific record we first select the record and
then we click Drill Down button at top.
All cases by contact
Then we want to show status contact wise for example Babara levy
has 3 cases and
Matrix [2 lvl (Row and column level grouping)]
Requirement
All cases by contact
Then we want to show status contact wise for example Babara levy
has 3 cases.
Suppose Babara levy has 5000 cases and how we know out of 5000
cases how many are new, in pogress etc
For that we do two level grouping
1 All cases by contact (Row level)
2 Cases Status Wise ( Column level )
Joined Reports
Pre – requisite
Needs objects that are related to each other.
2 or more related objects(through lookup/ Master
Detail) up to 5 blocks
Owner (user) ❌ will not work
After creating the account report click joined
report then add block
Requirement : From account we want to see
all the related object.
Select contact and account
And then add block.
Group across blocks
Edge communication, Opportunity related to account
are shown.
Summary what are joined reports
A parent object and has 4 child object whose
information are needed so that we can use in single
report.
Summarize records
Requirement
How many cases are made weekly
Custom Report types ,
Formulas and bucket Fields
So far we see how to make reports on standard object now we see
how to make reports on custom object.
On book custom object.
The object is not showing in custom report types
To fix this
Steup -> report type -> report and dashboards -> report types -> new
custom report type
Sometimes we have requirement to different label fields
In standard report type we can’t change the label
Now custom report Book is showing
SUPPOSE WE HAVE A REQUIREMENT IN WHICH WE HAVE TO SEE THE
ACCOUNT WHICH HAS NO CONTACT OR VICE VERSA.
Change with to without
Parent child custom reports
Formulas in reports
Row level formula and summary level formula
Click on Add row level formula
Output
Next case
We can’t use case functions because it is used for picklist fields.
If expected revenue > amount (profit)
Else if expected revenue < amount (loss)
Else neutral
For that we make row level formula
Output
This summary level formula only works when we done
grouping (at least one level)
Add summary level formula
Suppose we want total amount sum of same account then we use summary
formula
Bucket
Bucket is used to make category in report
For example : - The report is on opportunity
Amount > 10000000, “High sales”
Amount < 500000 - 10000000, “Medium sales”
Amount 0 – 500000, “Low sales”.
Because we made row level formula field already we cant make other
row level formula so we make bucket field.
Subscribers reports and dashboards,
Dynamic report
Requirement
On contact object make a button view cases / cases
report and report will be opened and whatever contact
we are in should open the report .
Suppose we have 4000 reports we don’t make 4k
reports we use dynamic report
lightning.force.com/lightning/r/Report/
00OdM000006K6FgUAK/view?
queryScope=userFolders&fv0=Mr. Sea
n Forbes
Lead Process (Potential
customer)
Marketing campaign
Lead Generate
Ads
Lead Generate
Referral
Lead Generate
Used to create the record type for the lead object.
Controls the picklist values for the Lead status object.
The Lead Process in Salesforce refers to the steps your sales team follows to
qualify a lead (a potential customer) and convert them into an opportunity (a
potential sale/ deal in progress). It defines the stages that a lead goes through,
from the initial contact to becoming a qualified prospect ready for further sales
activities.
Simplified Steps in the Lead Process:
1. Capture Lead: A lead is created when you get information about a
potential customer. This can happen through a web form, event, cold
call, etc.
2. Qualify Lead: The sales team evaluates the lead to determine if they are
a good fit for your products or services. This could involve checking their
interest level, budget, or readiness to buy.
3. Nurture Lead: If the lead is not ready to buy immediately, they may go
through a nurturing process where you stay in touch with them and
provide more information until they are ready to move forward.
4. Convert Lead: Once the lead is qualified, they can be converted into an
Account (the company), Contact (the person), and optionally an
Opportunity (a potential sale). At this stage, the lead process ends, and
the sales process begins.
5. Follow-Up: After conversion, you continue engaging with the new
account and contact to close the deal.
Lead Statuses
The lead process typically involves different statuses like:
New: The lead has just been captured.
Working: The sales team is actively engaging with the lead.
Qualified: The lead meets your criteria and is ready for conversion.
Unqualified: The lead does not meet your criteria and is dropped.
Customization
You can customize the lead process in Salesforce to fit your specific sales
workflow by defining different stages and statuses.
Lead Process for India:
You might have a specific set of steps and criteria tailored for the Indian
market.
This could include different qualifying questions, follow-up processes, or
even different sales teams handling these leads.
For example, the approach to selling in India might involve more local
language communication, specific product offers, or region-specific sales
tactics.
Lead Process for International Users:
This process would be adapted for customers outside of India.
You might have different stages, communication styles, or criteria for
qualifying these leads, considering the international market.
For example, international leads might require currency conversions,
different pricing models, or legal compliance checks.
Sales process (Used in opportunity object)
If opportunity is set to closed won that’s means that person is
doing business with us.
For example :- for solar panel opportunity we have a
different sales process.
For providing software services we have a different sales
process.
Support process (used in case object)
Record Types
Ek hi record ke different different types.
Used to control different picklist values.
We can show d/f fields to d/f records type in detail
page with the help of page layout.
For example : - A opportunity is for Indian users and one opportunity
for American users. Which picklist fields we want to show to a
particular Indian or American user that record type will control.
The stage field, status field on opportunity or case is controlled by
sale process or lead process or support process.
Scenario : - if record type is not visible to users
- Record type is not active
- Record type is active but not assigned to user Profile /
Permission sets.
In Salesforce, the control of picklist fields can depend on Sales and
Support Processes or Record Types, depending on the field and
context. Here's a breakdown:
1. Picklists Controlled by Sales and Support Processes
These processes are specifically tied to certain standard objects, and
they control the values available in picklist fields based on the
associated process.
Lead Process
Picklist Controlled: Lead Status
A Lead Process defines the lifecycle stages of a lead (e.g., New,
Working, Converted, Closed). Only values included in the Lead
Process will appear in the Lead Status picklist for records using
that process.
Support Process
Picklist Controlled: Case Status
A Support Process determines the lifecycle stages of a case.
Only values in the associated process will appear in the Case
Status picklist for records using that process.
Sales Process (Opportunity)
Picklist Controlled: Opportunity Stage
A Sales Process defines the stages in the Opportunity lifecycle
(e.g., Prospecting, Proposal/Price Quote, Closed Won, Closed
Lost). Only values included in the process will appear in the
Opportunity Stage picklist for records using that process.
2. Picklists Controlled by Record Types
Record Types control the availability of picklist values for both
standard and custom picklists, including which fields and layouts are
displayed.
Picklists Controlled by Record Types:
o All other picklist fields (both standard and custom),
except for Lead Status, Case Status, and Opportunity
Stage, are controlled by Record Types.
o Example:
Standard picklists like Industry, Type, Priority, or
Reason.
Custom picklist fields you create on objects like
Lead, Account, Opportunity, etc.
Key Differences:
Controlled by Record
Feature Controlled by Process
Type
Applies to specific Lead Status, Case Status, All other standard and
fields Opportunity Stage custom picklists
Based on lifecycle
Control Based on Record Type
processes (Sales, Support,
mechanism assignments
Lead)
Customization Limited to processes Fully configurable for
level defined for specific objects all picklists
Let me know if you'd like further details or examples!
Manage Duplicate records
- Duplicate data leads to dirty data/bad data.
To prevent we use Matching rules / Duplicate
rules : -
Limitations
Setup -> Matching rules
And then activate and if we have to use search duplicate rules