Download as pdf or txt
Download as pdf or txt
You are on page 1of 105

SALESFORCE PRACTICAL FILE

Chirag Jain
19BCON430
https://trailblazer.me/id/cjain146

Practical Topic Page

1 Create Reports and Dashboards for Sales and Marketing 2-24


Managers

2 Quick Start: Process Builder 25-29

3 Quick Start: lightning App Builder 30-33

4 Build a Battle Station App 34-44

5 Build a Data Model for a Recruiting App 45-57

6 Data Security 58-69

7 Visualforce Basics 70-75

8 Reports & Dashboards for Lightning Experience 76-97

PRACTICAL 1: Create Reports and Dashboards for Sales and


Marketing Managers

1
Create Report and Dashboard Folders

You've received a lot of requests from various stakeholders to analyze data in Salesforce.
How do you keep it all organized? Start by creating the necessary folders that can be shared
with various team members.

Create a new report folder called Global Sales Reports.

1. If you're not currently in the Sales app, click the App Launcher and select
Sales.
2. Click the Reports tab.
3. Click New Folder and enter the details.
Note: If the New Folder button is not present, it is recommended you create a new
Trailhead Playground.
4. For Folder Label, enter Global Sales Reports .
5. Click in the Folder Unique Name text box to auto-populate
the unique name. Don't worry, the unique name of this folder isn't checked.
6. Click Save.
7. Repeat steps 3-6 to create the following folders as subfolders under the Global Sales
Report folder:

2
o Admin Lightning Experience Reports
o Marketing Reports o Adoption
Reports

Create a new dashboard folder called Global Sales Dashboards:

1. Click the Dashboards tab.


2. Click New Folder and enter the details.
3. For Folder Label, enter Global Sales Dashboards .
4. Click in the Folder Unique Name text box to auto-
populate the unique name. Don't worry, the unique name of this folder isn't checked.
5. Click Save.

Share all the new folders with the Sales team:

1. Click Created by Me under Folders.


2. Click the arrow to the right of the Global Sales Dashboards folder, and select
Share from the menu.
3. From the Share With dropdown, select Role and Subordinates.
4. In the Search Roles... box enter and select Channel Sales Team , Eastern Sales
Team , and Western Sales Team .
5. Leave Access as View, and click Share.

3
6. Click Done to close the Share Folder pop-up.
7. Click the Reports tab, and click Created by Me under Folders.
8. Repeat steps 2-6 to share the Global Sales Reports folder. Note that the subfolders
Admin Lightning Experience Reports, Marketing Reports, and Adoption Reports will
automatically be shared with the same teams as their parent folder.

4
Adjust Settings
Before creating the first report, you'll need to associate the role of CEO with your profile
so all report data is viewable.

1. Click the gear icon and select Setup.


2. Enter Users in Quick Find and select Users.
3. Click Edit next to your name and change Role to CEO.
4. Click Save.

Next, edit the Close Dates for all of the existing opportunities. This is done so the
correct data appears when you run the current fiscal quarter report later in this project.

1. Click the App Launcher and select Sales.


2. Click the Opportunities tab.
3. Click Recently Viewed and select the All Opportunities list view.
4. Select the checkbox to the left of Opportunity Name to select all
opportunities.

Note: If you don't see checkboxes next to the opportunities, it may be because
you've applied opportunity record types in this org. If so, apply the following
filter to the all opportunities list view: Within the filter menu, click Add Filter >
Field = Opportunity Record Type, Operator = equals, Value = 0 options selected
> Click Done > Click Save.

5
5. With all opportunities selected, rollover the Close Date for one of the
opportunities and click the pencil icon.
6. Type in today's date.
7. Select the checkbox to Update 31 selected items.
8. Click Apply.
Note: All of the opportunities should now have today's date as their
Close Date.
9. Click Save at the bottom of the screen.

Create a Summary Report


Time to create a new opportunity report.

1. Click Reports.
2. Click New Report.
3. Under Recently Used on the left, click All.
4. In Search Report Types, enter Opportunities and select Opportunities.
5. Click Start Report.

Next, you'll use the Lightning Report Builder—a visual editor for reports. The report
builder screen lets you work with report fields and filters, and shows you a preview of your
report with just some of the data.

6
• The Fields pane (1) displays fields from the selected report type, organized by
folder. Find the fields you want using the Quick Find box and field type filters,
then drag them into the Outline pane or double click them to add them to your
report.
• The Outline pane (2) makes adding, removing and arranging columns a breeze
with a simple drag and drop feature. You can also add Bucket Columns and
Summary Formula Columns in the Outline pane.
• The Filters pane (3) allows you to set the view, time frame, and custom filters
to limit the data shown in a report.
• The Preview (4) offers a dynamic preview that makes it easy for you to
customize your report. Add, reorder, and remove columns, summary fields,
formulas, groupings, and blocks. The preview shows only a limited number of
records. Run the report to see all your results.

Set the scope of the report using the standard filters.

1. Enable Update Preview Automatically in the upper-right of the Report


Builder.
2. In the Preview pane, click the arrow next to the Opportunity Owner
column heading, and then select Group Rows by This Field.
3. Click the Filters pane.
4. Ensure Close Date is set to Current FQ.
5. Click Opportunity Status and select Open and click Apply.

Change the report columns as required.

1. Click the Outline pane and click the X next to the following column headers
to remove them: o Owner Role o Fiscal Period o Age o Created Date o Next
Step o Lead Source
o Type

Add a summary field.

1. Click the arrow next to the Amount column heading.


2. Select Summarize.
3. Click Sum.

Save the report as Opportunities by Rep in the Global Sales Reports folder.

1. Click Save & Run, and then complete the Save


Report details: o Opportunities by Rep ReportName:

7
o Clickin the Report Unique Name text box to auto-populate the unique
name. Don't worry, the
unique name of this What opportunities do reps have in the pipeline?

report isn't checked. o Report Description:


2. Click Select Folder, choose Global Sales Reports, and click Select
Folder.
3. Click Save.

Use Report Filters


You can add up to 20 additional filters to a report directly in the Filters pane using the
Add button or by dragging in fields from the Preview pane. In addition, you can also
use filter logic using “and,” “or,” and “not” operators. Let’s meet the needs of your
next stakeholder, the VP of Marketing, to see how filters and filter logic work.

He would like to see a list of all customer accounts based in Texas, North Carolina,
Illinois, and New York that have either a rating of Hot or Warm or an annual revenue of
$2 million and up.

Create a new account report.

1. Click Reports.
2. Click New Report.
3. Under Recently Used on the left, click All.
4. In Search Report Types, enter Accounts and select Accounts.
5. Click Start Report.
6. Ensure Update Preview Automatically is enabled in the upper-right of
the Report Builder.
7. Click the Filters pane.
8. Click Show Me and select All accounts, then click Apply.
9. Click Created Date, select All Time from the Range picklist, then click
Apply.
10. Click the Outline pane and select the X next to the following fields to
remove these columns from the report:
o Last Activity o Last
Modified Date
11. Click the Fields pane to expand the list of fields.

8
12. Double-click Annual Revenue to add it to the report.
13. Click the X to close the Fields pane.
14. Click and drag the Annual Revenue column so it is placed between the
Account Name and Billing State/Province columns.

Add the necessary filters and filter logic.

1. Click the Filters pane.


2. Search for Type in Add filter... search box and select it.
3. In the Operator field, select contains from the drop-down menu.
4. Type customer in the value field.
5. Click Apply.

6. Repeat steps 2-5 above to create the following three additional filters:
7. Note: Annual revenue is two million (six zeros).
8. In the Filters pane, click the arrow next to Filters and click Add Filter
Logic.

Field Operator
Billing State/Province equals
Rating equals
Annual Revenue greater or equal

9
9. In the Edit Filter Logic field, change the logic to 1 AND 2 AND (3 OR 4)
and click Apply.

Save the report as Central and Eastern Target Accounts in the Marketing
Reports folder:

1. Click Save & Run, and then


complete the Save Central and Eastern Target Accounts Report

details: o For Report Name:


o Click in the Report Unique Name text box to auto-populate the unique
name. Don't worry, the
unique name of this report Who are our important customers in the Central and
isn't checked. o For Report Description:
Eastern states?

2. Click Select Folder, select Marketing Reports from the Global Sales
Reports folder and click Select Folder.
3. Click Save.

10
Use Relative Dates
Instead of filtering data by calendar dates, such as Close Date > Jan 1, 2020, filter
your report by a relative date: Close Date = THIS YEAR. Yes, Salesforce will understand
this value!

Our CEO is very focused on user adoption of Salesforce and wants to ensure the
company is getting the most out of its user licenses. He wants a weekly report of all
users who have not logged into Salesforce in the last seven days as well as when
their login access is set to expire. How would you accomplish this?

Customize the Users Report Type to display users who have not logged in during the last
seven days:

1. Click Reports.
2. Click New Report.
3. Under Recently Used on the left, click All.
4. In Search Report Types, enter Users and select Users.
5. Click Start Report.
6. Ensure Update Preview Automatically is enabled in the upper-right of
the Report Builder.
7. Click the Outline panel.
8. In the Add column... search box, enter login access , and then select
Login
Access Exp. Date.
9. Click the Filters pane.
10. Click the Last Login Filter.
11. Under Date, click Last Login and select Login Access Exp. Date from
the dropdown list.
12. Leave Range as All Time and click Apply.
13. In the Add filter... search box, enter Last Login , then select Last Login.
14. Create the filter with these details:
o For operator, select not equal to
o Click Use relative date and enter LAST 7 DAYS

o Click Apply

11
15. Click Save & Run.
16. For Report Name, enter Users Not Logged in Last 7 Days .

17. Click in the Report Unique Name text box to auto-populate the unique
name. Don't worry, the unique name of this report isn't checked.
18. For Report Description, enter Who hasn’t logged in the last 7 days?

19. Click Select Folder, choose Adoption Reports from the Global Sales
Reports folder, and click Select Folder.
20. Click Save.

12
Group Data in Reports
One of the things that makes the Report Builder super easy to use is the ability to easily
drag groupings to move them between rows and columns in reports. We use a matrix
style report to display summaries from two or more levels of groupings in a grid. This
allows you to display more data in a smaller space and makes quick comparisons
across groups.

Let’s get back to your VP of Sales who would like the Opportunities by Rep report to show
opportunities additionally grouped by Close Date and displayed in a table. No problem!

We’ll modify the Opportunities by Rep report to group by the calendar month of the Close
Date:

1. Click the Reports tab.


2. Click All Folders.
3. Click Global Sales Reports.
4. Click the arrow next to Opportunities by Rep, and select Edit.
5. Ensure the Opportunity Owner column is grouped by row.
Note: If there is a number in parentheses next to the Opportunity Owner
name, the column is grouped. If not, click the arrow next to the Opportunity
Owner column heading and then select Group Rows by This Field.
6. In the Preview pane, click the arrow next to Close Date and select
Group Columns by This Field.
7. Click the arrow in the Close Date summary row, hover over Group
Date By, and then select Calendar Month.

8. At the bottom of the Preview pane slide the toggle next to Detail Rows
and Stacked Summaries to deselect them.
9. Click the arrow next to Save, and click Save As, then complete the
Save Report details: o Report Name:
o Click in the Opportunities by Rep and Close Month Report Unique Name text
box to auto- populate the unique name.
Don't
Report Description: What opportunities do your sales reps have in the
worry, the
unique
name of
pipeline and when do they close?
this report
isn't checked.

13
o

10. Ensure that this report is being saved in the Global Sales Reports.
11. Click Save.
12. Click Run.

Use Bucket Fields


Matrix reports are a useful way to view data, but what if you need to organize your
groupings by categories? That’s where bucketing comes in. Bucketing lets you segment
your report data on the fly by defining a set of categories, or “buckets,” to sort, group,
or filter the records.

Let’s check out how bucketing works and fulfill one of your VP of Sales’ reporting needs.
We’ll create a matrix report again, but this time show opportunities by owner, stage,
and size in the pipeline this Fiscal Quarter.

Create a new Opportunity report:

1. Click Reports.
2. Click New Report.
3. Under Recently Used on the left, click All.
4. In Search Report Types, enter Opportunities and select Opportunities.
5. Click Start Report.
6. Ensure Update Preview Automatically is enabled in the upper-right of
the Report Builder.
7. Click the Filters pane.
8. Ensure Close Date is set to Current FQ.
9. Click Opportunity Status, select Open then click Apply.
10. Click the Outline pane and click the X next to the following column
headers to remove them: o Owner Role o Fiscal Period o Age o Created
Date o Next Step o Lead Source o Type

Add a bucket field to categorize the opportunities as small, medium, or large.

1. In the Outline pane, click the arrow next to Columns and click Add
Bucket Column.
2. Remove current selection within the Field box, then search for and select
Amount.
3. For Bucket Name, enter Size .

14
4. Complete the first range as follows: o Range: <= o Name:
5. Click Add, then 50000 complete the second range:
o Range: > 50,000 Small 100000
to o Medium Name:

6. For the third range (> 100,000), in the Name field enter Large .

7. Ensure Treat empty Amount values in the report as zeros is selected.

8. Click Apply.

Group the report by Stage and Opportunity Owner, and by Size.

1. In the Preview pane, click the arrow next to Opportunity Owner and
select Group Rows by This Field.
2. In the Preview pane, click the arrow next to Stage and select Group
Rows by This Field.
3. Click the arrow next to Size and select Group Columns by This
Field.
4. At the bottom of the Preview pane, slide the toggle next to Detail Rows,
Subtotals, and Grand Total to deselect them.

15
5. Click Save & Run and complete the
report details: o Pipeline Matrix Report Current FQ Report Name:
o Click in the Report Unique Name text box to auto-populate the unique name.
Don't worry, the unique name of this report isn't checked.

16
o

Report Description: How big are the deals at each stage in the pipeline
this FQ?

6. Click Select Folder, choose Global Sales Reports, and click Select Folder.
7. Click Save.

Summarize Your Data in a Whole New Way


Summary formulas are a great way to calculate additional totals based on the
numerical values in your report. In addition to the standard summaries that we used
in a previous step, you can add up to five summary formulas to summary and matrix
reports to create calculated summaries of your numerical fields. Your VP of Sales
knows what each of her reps have in their pipelines; however, she would also like to
see how they’re closing deals. Let’s build a report to show how her percentage of
closed opportunities are actually being won.

Modify the Opportunities by Rep report to display closed opportunities by sales rep:

1. Click the Reports tab.


2. Click the arrow next to the Opportunities by Rep report, and select Edit.
3. Click the Filters pane, click Opportunity Status.
4. Select Closed then click Apply.

Add a custom summary formula to display the win rate by sales rep:

1. Click the Outline pane


Note: If some of the following options do not fit on your screen,
temporarily
2. Click the arrow
zoom out
via your
internet
browser
settings.
next to
Columns
and click

17
o

Add Summary Formula.

3. Complete the following details: o Column Name: o


Description: Win Rate

Formula Output Type: Ratio of won to closed opportunities


Percent o Decimal 2
Points:
4. Place the cursor in the Formula section and complete the details:
o In Search fields type and select Won [1], ensure Sum [2] is selected and
click Insert [3].

18
o

o
Place the cursor in the formula after SUM and enter . /
In the Search Fields menu, type and select Closed, then
select Sum and Insert.

19
o

5. Ensure your formula looks like this: WON:SUM/CLOSED:SUM .

6. Click Validate to ensure your formula has no errors.


7. Click Apply.
8. At the bottom of the Preview pane, slide the Detail Rows toggle to off.

Save the report as a new report called Sales Rep Win Rates in the Global Sales Report
folder:

1. Click the arrow next to Save and click Save As.


2. Complete the Save Report details: o Report Name:
o Click in the Sales Rep Win Rates Report Unique Name text box to

auto-populate the unique name.


Don't worry, the How well are my sales reps closing? unique name of
this report isn't checked. o Report Description:
3. Ensure this report is being saved to the Global Sales Reports folder.
4. Click Save.
5. Click Run.

20
o

21
Export a Report as CSV
As good as Salesforce reports and dashboards are, it’s sometimes still helpful to
export your data and manipulate it in spreadsheet software. No problem! Salesforce
allows you to export report details in .CSV or .XLS formats. Use your favorite
spreadsheet software to further manipulate the data as needed. Note that the export
will not have formatting, groupings, or subtotals.

Your CEO would like a printable, adjustable output of the Users Not Logged in Last 7
Days report.

Run the Users Not Logged in Last 7 Days report:

1. Click the Reports tab.


2. Click the Users Not Logged in Last 7 Days report.

Save the report data as an .csv file:

1. Click the arrow next to Edit.


2. Click Export.
3. Click Details Only and select the following options:
o Format: Comma Delimited .csv
o Encoding: ISO-8859-1 (General US & Western European, ISOLATIN-1)
4. Click Export.
5. Locate the file on your computer and open it. Note that the report data is
displayed and can be manipulated in the spreadsheet software and printed.
6. Save the file as Users Not Logged in Last 7 Days Export Details .

22
Report Charts
When it comes to reports and analyzing what seems like endless data, it can be
information overload. What if there was an easy way to get a visual summary of all
that information? Enter report charts and dashboards.

The Lightning Experience offers enhanced data charts to summarize reported data.
You can adjust the chart type without making changes to the report itself.

Let’s see charts in action. Your CEO is so impressed with the work you’ve done, he’s
asked for something special. He wants a way to display sales rep performance
graphically.

Add a vertical bar chart to compare sales rep win rates:

1. Click the Reports tab.


2. Click on Sales Rep Win Rates then click Add

Chart to display a chart.

3. Click the gear icon in the upper right


corner of the chart to open the chart editor.

4. Click Column to change the display to a vertical bar chart.


5. Complete the chart attributes:
a. Chart Title: Sales Rep Win Rates
b. Click the Y-Axis dropdown and set to Win Rate

6. Click the gear icon to close the chart editor.


7. Click the arrow next to Edit and choose Save from the dropdown.

Dashboards
Let’s take visualizing data a step further. The VP of Sales would like a Global Sales
dashboard that lets her see the key information at a glance. A dashboard is a visual
representation of data from multiple reports and does the following:
23
• Displays data from custom source reports
• Has a running user to determine what data is visible
• Displays data as of the last time the dashboard was refreshed
• Can be scheduled to be refreshed and emailed automatically

The dashboard editor in Lightning Experience gives you a responsive way of creating
or editing dashboards using drag-and-drop. Let’s take a look.

Create the Global Sales dashboard:

1. Click the Dashboards tab.


2. Click New Dashboard.
3. Set the Name to Global Sales Dashboard .

4. Click Select Folder, choose the Global Sales Dashboards, then click Select
Folder.
5. Click Create.

Add an Opportunities by Rep chart component:

1. Click +Component.
2. In the report search bar, enter Opportunities , click Opportunities by Rep, then
click Select.

3. From the Display As menu, click the Vertical Bar Chart option.
4. Ensure the Y-Axis is set to Record Count.
5. Ensure the Show Values box is selected.
6. Complete the text areas: o Title: o Subtitle:
7. Click Add. Sales Pipeline

8. Click Save. Number of Open Opportunities by Rep

Add Opportunities by Rep metric component:

1. Click +Component.
2. In the report search bar, enter Opportunities , click Opportunities by Rep, then
click Select.

3. From the Display As menu, select the Metric option.

1000000

24
4. Ensure Measure is set to Sum of Amount and Display
Units is set to Shortened Number. In the Segment Range,
3000000
replace the default value of 33 with (that's 1 million, as in six
zeros after the one) and replace 67 with (three million).
5. Complete the text areas: o Title: o Footer:
6. Click Add. Total Open Opportunities
7. Drag the metric component to the Value of open opps in sales pipeline
right of
the Opps by Rep vertical bar chart.
8. Click Save.

Add the Sales Rep Win Rates table component:

1. Click +Component.
2. In the report search bar, enter Sales Rep , click Sales Rep Win Rates, then click
Select.
3. Select Lightning Table from the Display As menu.
4. In the Columns section, click the following columns to remove them from this
component: o Account Name o Stage o Close Date
Note: Opportunity Name and Amount should be the only remaining

25
columns.

5. Update the Title to .


Opportunities Won
6. Click Add.
7. Drag the table to the right of the Total Open
Opportunities
Won
Opportunities metric, to create a third dashboard
8. Click Save. column.

26
Add Sales Rep Win Rates gauge component:
1. Click +Component.
2. In the report search bar, enter Sales Rep , click Sales Rep Win Rates, and then
click Select.

3. From the Display As menu, select the Gauge


Component option.
Leave the segment ranges set as is.
4. Change the Measure to Win Rate.
5. Complete the text areas.
o Title: o
Footer: Company Win Rate

Ratio of won to closed opps

6. Click Add.
7. Drag the Company Win Rate gauge to the right of the Opportunities Won
component, to create a fourth dashboard column.
o You will need to resize the chart components to create four columns.
Don't worry, component arrangement on your dashboard is not
checked when verifying this step.
8. Click Save.
9. Click Done.

Congrats! You made it easier for your stakeholders to review their Salesforce data
with ease and efficiency. You harnessed the power of Report Builder to customize
Salesforce objects and fields into meaningful information. Filters, report types, charts,
and dashboards further segmented your data so only the most important
information was presented. Great job—you just saved your executive team a lot of
time and energy!

27
PRACTICAL 2: QUICK START: PROCESS BUILDER

Create a New Process on the Account Object


Introduction
Process Builder is a workflow tool that helps automate business processes without
writing a single line of code. For example, imagine that a company you do business
with (which we call an Account in Salesforce), changes its location. You'd want a way
to automatically update the business address of all the people that work at that
company (your Contacts).

In this Quick Start, you'll do exactly that: create a new process that updates Contact
records whenever the Account billing address changes. As you'll see, it's quite easy,
and doesn't require a shred of code.

28
Create a New Process on the Account Object
You first create a process and then select the object on which the process runs. You
also make sure the process kicks off whenever a record is edited, because you’re
going to change the business address in a moment.

1. Click and select Setup. This launches Setup in a new tab.


2. From Setup, enter Builder in the Quick Find box, and select Process Builder.
3. Click New.
4. Click the Continue with Process Builder button.
5. For Process Name, type Contact address change .
6. For The process starts when, select A record changes, and click Save.
7. Click + Add Object.
8. In the right window, select Account from the Object drop-down list.
9. For Start the process select when a record is created or edited.
10. Click Save.

Add Process Criteria


Create Criteria
You now define the criteria that determine when this process runs.

1. Click Add Criteria.


2. For Criteria Name, type Address Change .
3. For Criteria for Executing Actions, keep it set to Conditions are met.
4. For Set Filter Conditions, click Find a field..., select Billing Street and click Choose.
5. Set Operator to Is Changed, and set Value to True.
6. For Conditions, keep it set to All of the conditions are met (AND).
7. Click Save.

29
In plain language, this all means "run this process when the Billing Street changes."

Add Your Process Action


Create an Action
At this point you've defined a process, and told it when to fire, but you haven't told it
what to do. In this step you define what happens when the Billing Street changes.

1. Under the Immediate Actions box, click + Add Action.


2. In the Action Type drop-down list, select Update
Records. Update Contact Addresses
3. For Action Name, type .
4. For Record Type, click the radio button next to Select a record related to the
Account, then scroll down and select Contacts, and click Choose. This is pretty

30
powerful stuff, so pause and take note. Process Builder allows you to choose not just
fields on Accounts, but fields that are related to Accounts.
5. For Criteria for Updating Records, keep it set at No criteria—just update the
records!.
6. Under Set new field values for the records you update, click Find a field..., and
then scroll down and select Mailing Street.
7. Select Field Reference for the Type.
8. For Value, select Billing Street as the Account field and click Choose.
9. Click Save.
10. Click Activate and then click Confirm.

Test Your Process


Check the Process
If everything works correctly, whenever an account has a change of address, the
address change is made for everyone who works for that company. Let’s test that.

1. Click to open the App Launcher. Select Contacts.


2. Click Recently Viewed and select the All Contacts list, then click Tim Barr.
3. On Tim Barr’s contact record, click Details.

31
4. On Tim Barr’s detail page, note the mailing address [1] and account name [2].

5. Click the account name, Grand Hotels & Resorts Ltd. This opens the account for
Grand Hotels & Resorts Ltd.
6. On the Grand Hotels & Resorts Ltd. account record, click Details.
7. Click Edit.
8. Change the billing street address and click Save.
9. Click Related.
10. Scroll down to Contacts and click Tim Barr. Click Details. On his detail page, notice
that his mailing address has been updated.

32
PRACTICAL 3: QUICK START: Lightning App Builder

Install the Schema Package Introduction


Salesforce Connect lets you seamlessly access data from legacy systems such as SAP,
Microsoft and Oracle in real time, without making a copy of the data in Salesforce. In
this Quick Start, you'll integrate data from a sample external data source into
Salesforce using Salesforce Connect. You'll start by setting up an external data source
and creating some external objects. You'll then create relationships between the
external objects and the Account standard object.

Install the Schema Package


Your Trailhead Playground needs the custom field Customer ID on the Account
object. This field allows you to link orders from an external data source to accounts in
Salesforce. This package configures the new field and populates it with data.

33
To install the package, launch your playground by scrolling to the bottom of this
page and clicking Launch. If you see a tab in your org labeled Install a Package,
great! Follow the steps below.

If not, click the App Launcher, then click Playground Starter and follow the steps. If
you don’t see the Playground Starter app, copy this package installation link and
check out Install a Package or App to Complete a Trailhead Challenge on Trailhead
Help.

1. Click the Install a Package tab.


2. Paste 04tE00000001aqG into the field.
3. Click Install.
4. Select Install for Admins Only, then click Install.
5. When the package is finished installing, you see a confirmation page and get an email
to the address associated with your playground. Click Set Customer IDs to assign
customer IDs to account records in your hands-on org.
6. Click Done.

Create an External Data Source and External Objects Add


an External Data Source
In a real production system, you would use Salesforce Connect to access data in a
back-end system, such as SAP or Microsoft SharePoint. In this task, you connect to a
sample data source running on Heroku.

1. From Setup, type External Data into the Quick Find text box. Click External Data
Sources
and OrderDB for External Data Source and name the data source OrderDB select New
External
Data Source.
2. Enter , and select Salesforce Connect:
https://orderdb.herokuapp.com/orders.svc OData 2.0 as the type.
3. Enter as the URL. Leave the other fields with
their default values, and click Save.
4. On the next screen, click Validate and Sync. Salesforce Connect retrieves the schema
from the external system.
5. Select both the Order and OrderDetail tables, and click Sync.

Scroll down to see the new external objects. Click them to see their fields.

34
Create an Indirect Lookup Relationship Add
an Indirect Lookup Field
An indirect lookup relationship is a new field type introduced with Salesforce
Connect. It links an external object to a standard or custom object in the same way
that a regular lookup relationship links standard or custom objects. In this task, you
link Order to Accounts based on their Customer ID fields, resulting in a new related
list on the Account page.

1. From Setup, type External Objects into the Quick Find text box. Select External
Objects. Select Order.
2. Next to the customerID field, click Edit and then click Change Field Type.
3. Select Indirect Lookup Relationship as the data type, and click Next.
4. For the Related To value, select Account and then click Next.
5. For the Target Field value, select Customer_ID__c and and click Next.
6. Enter 18 as the field length. Leave the other options with their defaults. Click Next.
7. To make the field visible to all profiles, select the checkbox next to Visible and click
Next.
Note: In a real production setting, you would carefully analyze who should have
access to order data.
8. Leave all the checkboxes in their default state and click Save. A new Orders related list
is added to the Account page layouts.
9. Check your work!

o From the App Launcher , select Sales and then select the
Accounts tab. Select All Accounts to view all accounts.
o Click any sample account to see its details. Scroll to the bottom to view
a list of orders.

35
10. In the External ID column, click an order number to see that order's data. Note that
only metadata—the layout or schema of the external tables—is synchronized into
Salesforce. The data itself is read dynamically in real time. It is never duplicated into
the Salesforce environment.

Create an External Lookup Relationship Add


an External Lookup Field
An external lookup relationship is another new field type introduced with Salesforce
Connect. This type links an object to an external object. In this task, you link an
external object to another external object! You link Order Detail to Order based on
the Order ID field in both objects, resulting in a new related list on the Order page.

1. From Setup, type External Objects into the Quick Find text box. Select External
Objects and select OrderDetail.
2. Next to the orderID field in Custom Fields & Relationships, click Edit and then click
Change Field Type.
3. Select External Lookup Relationship as the data type, and click Next.
4. For the Related To value, select Order and then click Next.
5. Enter 18 as the field length. Leave the other options with their defaults. Click Next.
6. To make the field visible to all profiles, select the checkbox next to Visible and click
Next.
7. Leave all the checkboxes in their default state and click Save. A new OrderDetails
related list is added to the Order page layouts.
8. Check your work! Navigate back to the account that you were looking at before. Click
an order number to view a new related list below the order data.

9. Click an External ID to see the line item's data.

36
PRACTICAL 4: Build a Battle Station App

Create a Cross-Object Formula


To take care of Ling Wu’s request, start by creating a cross-object formula field to
display the Candidate full name on the Review object.

1. From Setup, click Object Manager, then select Review.


2. Click Fields & Relationships.
3. Click New.
4. Select Formula as the Data Type.
5. Click Next, and fill in the details. o Field Label:
o Formula Candidate Name Return Type: Text

6. Click Next.

37
7. Select the Advanced Formula tab, and add the formula in the box under
Candidate Name (Text) =
Job_Application__r.Candidate__r.First_Name__c &" "&
Job_Application__r.Candidate__r.Last_Name__c
Copy
8. Ensure your screen looks like this.

9. Click Check Syntax to verify there are no errors.


10. Click Next.
11. Ensure the Visible checkbox is checked so all profiles are selected, and click
Next.
12. Click Save & New.

Now create a cross-object formula field to display Position Title on the Review object.

1. Select Formula as the Data Type field.


2. Click Next and fill in the details: o Field Label:
o Formula Position Title Return Type: Text
3. Click Next and add the formula under Position Title (Text) = (Note: The label
of the Name field is Title.)

Job_Application__r.Position__r.Name

Copy
4. Ensure your screen looks like this.

38
5. Click Check Syntax to verify there are no errors.
6. Click Next.
7. Ensure the Visible checkbox is checked so all profiles are selected, and click
Next.
8. Click Save.

Finally, modify the Review page layout with a new section called Position &
Candidate.

1. While still viewing the Review in Object Manager, click Page Layouts.

2. Click next to Review Layout, and select Edit.


3. Drag Section from the palette to below the Information section.
4. For Section Name, enter Position & Candidate .
5. Under Layout, Choose 2-Column.
6. Click OK.
7. Click and drag Position Title and Candidate Name from the Information
section into the new section.
8. Click Save.

Create Validation Rules


Validation rules verify that the data a user enters in a record meets the standards you
specify before the user can save the record. A validation rule can contain a formula or
expression that evaluates the data in one or more fields and returns a value of “True”

39
or “False.” They can also include an error message to display to the user when the
rule returns a value of “True” due to an invalid value.

You can use validation rules to improve data integrity, make a field conditionally
required, prevent the entry of invalid data values directly by users and other systems,
and enforce role-specific, profile-specific, or user-specific constraints.

Ling Wu wants to be sure AW Computing recruiters list a hiring manager every time
they set up a position in the recruiting app. It’s also come to Ling’s attention that
some candidates’ zip code and state don’t match. She’d like a fix for both these
issues, which you can accomplish by creating validation rules.

Set Up the First Rule


First create a validation rule requiring a hiring manager be included with each
position listing in the recruiting app.

1. From Setup, click Object Manager and select Position.


2. Click Validation Rules, then click New.
3. For the Rule Name, enter Every_Position_Must_Have_a_Hiring_Mgr
4. Select Active.
5. Enter this Description: Every position record must have a hiring manager .
6. Enter the Error Condition Formula: ISBLANK
(Hiring_Manager__c) && $Profile.Name <> "System Administrator"

7. Ensure your screen looks like this:

8. Click Check Syntax to verify there are


no errors. Every Position must have a Hiring Manager.
9. Enter this Error Message:
10. Choose Field: Hiring Manager from the Error Location picklist.
11. Click Save.

40
Create Custom Objects
Ling’s mismatched state and zip code issue requires a little work before setting up
the validation rule. First, you create custom objects for zip code and state, and add
fields to each of them.

Let’s start with the zip code custom object.

Field Value

Label Zip Code

Plural Label Zip Codes

Record Name Zip Code

Data Type Text

Allow reports Select

1. From Setup, click Object Manager, click Create, then select Custom Objectand enter
the details.

2. Click Save.

Now add a field to the Zip Code object.

1. While still viewing the Zip Code in Object Manager, click Fields & Relationships, then
click New.
2. Select Text as the Data Type, click Next, and enter the details. o Field Label:
o Length: 2 State

3. Click Next.
4. Set the field visible for the Recruiter: Nontechnical, Recruiter Technical, and System
Administrator profiles, and click Next.
5. Click Save & New.

Add a second field to the Zip Code object.

1. Select the Text as the Data Type, click Next, and enter the details:
2. Enter the details for the new custom field. o Field Label:
o Length: 80 City
3. Click Next.
4. Set the field visible for the Recruiter: Nontechnical, Recruiter Technical, and System
Administrator profiles, and click Next.

41
5. Click Save.
Next, modify the Zip Code page layout so that the fields are displayed in a logical
order.

1. While still viewing the Zip Code in Object Manager, click Page Layouts.

2. Click next to Zip Code Layout and select Edit.


3. In the Information section, drag the fields to rearrange them in the order of City,
State, then Zip Code.
4. Click Save.

Create a Zip Code Tab


Next, create a Zip Code tab in the Recruiting app.

1. From Setup, enter Tabs in the Quick Find box, then select Tabs.
2. In the Custom Object Tabs section, click New.
3. From the Object picklist, select Zip Code.

4. Click and select Map.


5. Click Next.
6. Leave the profile as is and click Next.
7. In the Add to Custom Apps section:
o Deselect Include Tab. o Ensure Append tab to users’ existing
personal customizations is selected
8. Click Save.

Now create new ZIP code records.

1. Click to open the App Launcher, then click Recruiting.


2. Click the pencil icon in the top right corner of the screen.
3. Click Add More Items.
4. From the menu on the left, select All.
5. Click the next to Zip Codes.
6. Click Add 1 Nav Item.
7. Click Save.
8. Click the Zip Codes tab.
9. Click New.
10. Enter a city, state and zip code.
11. Click Save & New and enter a new city, state and zip code.
12. Click Save.

42
Set Up the Second Rule
Now create a validation rule that checks the zip code entered against a table to
validate that the zip code and state match.

1. From Setup, Click Object Manager and select Candidate.


2. Select Validation Rules related list, click New, and fill in the details.
3. For Rule Name enter Zip Code Consistent with State .
4. For Description, enter: Validates candidate Zip/Postal Code by looking up the first
five characters of the value in a custom object called Zip_Code__c. Error if the zip
code is not found or the candidate State does not match the corresponding

State in the object .


5. Enter this Error Condition Formula:

VLOOKUP($ObjectType.Zip_Code__c.Fields.State__c,
$ObjectType.Zip_Code__c.Fields.Name, LEFT( Zip_Postal_Code__c ,5) ) <>
State_Province__c
Copy
6. Ensure your screen looks like this:

7. Click Check Syntax to verify


there are no errors. Candidate Zip Code does not exist in specified State
8. For the Error Message, enter .
9. For Error Location, select Field and Zip/Postal Code.
10. Click Save.

43
Create Formula and Roll-Up Summary Fields
HR recruiters and interviewers have entered lots of data about their candidates into
their recruiting app. But for that review data to be useful, they need it calculated and
scored. Use rollup summary fields and formulas to accomplish this.

A rollup summary is kind of the reverse of a cross-object formula (which you created
in the first step of this project). Instead of getting data from a parent (or
grandparent) object, it gets data from records on a child object and stores that
data—results are recalculated and stored whenever any record on the detail record is
saved.

Formula fields take input from other fields, values, functions, and operators to
produce results. They can reference standard fields, custom fields, and other formula
fields. Formula results are not stored—the formula expression is stored as metadata.
But the result of that expression is calculated on the fly whenever a user views a
record or runs a report containing the formula field.

Create a Formula
Create a custom formula field that calculates the overall score from the Review
object.

1. From Setup, click Object Manager, and select Review.


2. Click Fields & Relationships, then click New.
3. Select Formula as the Data Type, and click Next.
4. For Field Label, enter Overall Review Score .
5. For Formula Return Type, choose Number.
6. Click Next and add the formula under Overall Review Score (Number) =

( VALUE(TEXT(Core_Competencies__c)) + VALUE(TEXT(Experience__c)) +
VALUE(TEXT(Leadership_Skills__c)) + IF( Recommend_for_Hire__c , 5, 0) ) / 4

Copy
7. Ensure your screen looks like this:

44
8. Click Check Syntax to verify that there are no errors.
9. Click Next, Next, then Save.

Create Roll-Up Summary Fields


Now, create a rollup summary field for Number of Reviews on the Job Application
object.

1. From Setup, click Object Manager, and select Job Application.


2. Click Fields & Relationships, then click New.
3. For Data Type, choose Roll-Up Summary, and click Next.
4. For Field Label, enter Number of Reviews .
5. Click Next.
6. Select Reviews from the Summarized Object picklist.
7. Select Count as the Roll-Up Type.
8. Select All records should be included in the calculation as the Filter Criteria.
9. Click Next, Next, then Save & New.

Next, create a roll-up summary field for Review Scores on the Job Application object.

1. Select Roll-Up Summary as the Data Type, and click Next.


2. For Field Label, enter Total Review Score .
3. Click Next.
4. Select Reviews from the Summarized Object picklist.
5. Select Sum as the Roll-Up Type.
6. Select Overall Review Score as Field to Aggregate.
7. Select All records should be included in the calculation as the Filter Criteria.

45
8. Click Next, Next, then Save & New.

Create Additional Formulas


Now create a formula field that calculates the Average Review Score for a job
application.

1. Select Formula as the Data Type, and click Next.


2. For Field Label, enter Average Review Score .
3. Select Number as the Formula Return Type.
4. Click Next and add the formula under Average Review Score (Number) =
IF(Number_of_Reviews__c <> 0, Total_Review_Score__c / Number_of_Reviews__c,
null)
Copy

5. Ensure your screen looks like this.

6. Click Check Syntax to verify there are no errors.


7. Click Next, Next, then Save & New.

Create a formula field to show a green, yellow, or red light on a job application
record, depending on the Average Review Score.

1. Select Formula as the Data Type, and click Next.


2. For Field Label, enter Review Indicator .
3. Select Text as the Formula Return Type.
4. Click Next and add the formula under Review Indicator (Text) =
IF(Average_Review_Score__c >= 3.5,IMAGE("/img/samples/light_green.gif",
"Green"),IF(Average_Review_Score__c >=
2.5,IMAGE("/img/samples/light_yellow.gif",
"Yellow"),IF(Average_Review_Score__c >

46
0,IMAGE("/img/samples/light_red.gif", "Red"),"No Reviews")))
Copy

5. Ensure your screen looks like this:

6. Click Check Syntax to verify there are no errors.


7. Click Next, Next, then Save.

Now move the new fields to a Candidate Rating Section on the Job Application page
layout.

1. While still viewing the Job Application in Object Manager, click Page Layouts on the
left navigation bar.

2. Click next to Job Application Layout, and select Edit.


3. Add a new section to the page layout, by dragging Section from the palette to below
the information section.
4. Fill in the section properties: o For Section Name, enter . o For
Layout, select 1-Column. Candidate Rating

5. Click OK.
6. Drag the Number of Reviews, Total Review Score, Average Review Score, and
Review Indicator fields from the Information section into the Candidate Rating
section.
7. Click Save.

47
PRACTICAL 5: BUILD A DATA MODEL FOR A RECRUITING
APP

Create a Custom Object for Reviews Learning


Objectives
In this project, you’ll:

• Create custom objects, site objects, and junction objects to make an existing app
more efficient.
• Customize page layouts, create relationships, and add filters to give app users easy
access to the information they need.
• Add custom fields to the app to capture information critical to the hiring process.

Introduction
Since implementing Salesforce 6 months ago, AW Computing has been on an
upward trajectory in sales and revenue. And with that comes the need to beef up the
staff across a number of departments. Ling Wu, the vice president of human

48
resources, has asked you to help her recruiting team more efficiently handle the
hiring process.
In this project, you use your awesome admin skills to create custom objects,
relationships, page layouts, and more, to give the HR team easy access to the data
they need on their existing Recruiting app. Before you get hands-on, let’s install an
unmanaged package in your Trailhead Playground. It will add metadata and
customizations that make your hands-on work more realistic and meaningful.

Install the Unmanaged Package


First, scroll to the bottom of this page and click Launch to launch your Trailhead
Playground. If you see a tab in your org labeled Install a Package, great! Follow the
steps below.

Field Value

Label Review

Plural Label Reviews

Record Name Review Number

Data Type Auto-Number

Display Format REV-{0000}

49
If not, Starting Number 1
click
to launch the App Launcher, then click Playground Starter and follow the steps.
If you don’t see the Playground Starter app, copy this package installation link and
check out Install a Package or App to Complete a Trailhead Challenge on Trailhead
Help.

1. Click the Install a Package tab


2. Paste 04t0P000000N9rs into the field.
3. Click Install.
4. Select Install for Admins Only, then click Install.

When the package is finished installing, you see a confirmation page and get an
email to the address associated with your playground.

Create a Review Custom Object


Now that the package is in place and you have the Recruiting app open, you can get
to work. The first thing on your list is creating a custom object for reviews.

1. From Setup, click Object Manager.


2. Click Create, select Custom Object, and fill in the details.
3. In the Optional Features section, select Allow Reports and Track Field History.
4. In the Deployment Status section, ensure Deployed is selected.
5. In the Search Status section, select Allow Search.
6. In the Object Creation Options section, select Add Notes and Attachments related
list to default page layout.
7. Leave everything else as is, and click Save.

Create a Custom Object for Job Posting Sites


One of Ling Wu’s requests is for you to help her team keep track of which websites
host AW Computing’s open positions. To fulfill her request, create a Job Posting Site
object with a field for Job Posting Site URL, a Status picklist, a Technical Site
checkbox, and a Description text area.

Create the Job Posting Site Object


1. From Setup, click Object Manager.

50
2. Click Create, select Custom Object, and fill in the details.

3. In the Optional Features section, select Allow Reports and Track Field History.
4. In the Deployment Status section, ensure Deployed is selected.
5. In the Search Status section, select Allow Search.
6. In the Object Creation Options section, select these options:
o Add Notes and Attachments related list to default page layout o
Launch New Custom Tab Wizard after saving this custom object
7. Leave everything else as is, and click Save.
8. Use these criteria to configure the New Custom Object Tab:

Don't see the custom wizard setup screen? You might have missed the step above to
launch the new custom tab wizard. To create the tab, enter Tabs in Quick Find and
select Tabs. Then click New under Custom Object Tabs. Then follow the instructions
below.

• Object: Job Posting Site


• Tab Style: Click the magnifying glass and select Real Estate Sign.

Field Value

Label Job Posting Site

Plural Label Job Posting Sites

Record Name Site Name

Data Type Text

51
1. Click Next.
2. Leave the profile as is and click Next.
3. In the Add to Custom Apps section:
o Deselect Include Tab.
o Select Append tab to users’ existing personal customizations.
4. Click Save.

Create Custom Fields on the New Object


Next, create a few custom fields to further customize the HR team’s user experience.

1. While still viewing Job Posting Site in Object Manager, click Fields & Relationships
and then click New.
2. Select URL as the Data Type.
3. Click Next.
4. For Field Label, enter Job Posting Site URL .
5. Click Next, Next, and click Save & New.

Fill in the details for the next custom field.

1. Select Picklist as the Data Type.


2. Click Next.
3. For Field Label, enter Status .

52
4. Select Enter values, with each value separated by a new line and enter these
values:
o Active

o
5. Click Next, Next, and click Save & New.
Inactive

Fill in the details for the next custom field.

1. Select Checkbox as the Data Type.


2. Click Next.
3. For Field Label, enter Technical Site .
4. Click Next, Next, and click Save & New.

Fill in the details for the final custom field.

1. Select Text Area as the Data Type.


2. Click Next.
3. For Field Label, enter Description .
4. Click Next, Next, and click Save.

Create a Custom Junction Object for Job Postings


Your next step in improving HR’s recruiting app is to create a junction object called
Job Posting. A junction object is a custom object with two master-detail
relationships, and it is the key to making a many-to-many relationship.

A job posting fits into the space between positions and employment websites. One
position can be posted many times, and one employment website can have many job
postings, but a job posting always represents a single position on a single
employment website.

In essence, the Job Posting object has a many-to-one relationship with both the
Position and the Job Posting Site objects. Through those many-to-one relationships,
you create a many-to-many relationship between the Position and Job Posting Site
objects.

Create a Custom Junction Object


1. From Setup, click Object Manager.
2. Click Create, select Custom Object, and fill in the details.

53
3. Leave everything else as is, and click Save.

Next, Value
Field
create
the Label Job Posting

Plural Label Job Postings

Record Name Job Posting Number

Data Type Auto Number

Display Format JOBPOST-{0000}

Starting Number 1

master-detail relationship between Job Posting and Position.

1. While still viewing Job Posting in Object Manager, click Fields & Relationships, then
New.
2. Select Master-Detail Relationship as the Data Type.
3. Click Next.
4. For Related to, select Position.
5. Click Next.
6. For Field Label, enter Position .
7. Click Next, Next, Next and Save & New.

Now fill in the details for a master-detail relationship between Job Posting and Job
Posting Site.

1. Select Master-Detail Relationship as the Data Type.


2. Click Next.
3. For Related to, select Job Posting Site.
4. Click Next.
5. For Field Label, enter Job Posting Site .
6. Click Next, Next, Next and Save.

Modify the Page Layouts


Next, add fields to the Job Posting Site related list on the Position page layout.

1. From Setup, click Object Manager.


2. Click Position, then Page Layouts.

54
3. Click next to Position Layout and select Edit.

4. Scroll down to the Job Postings related list, and click in the header to edit it.

5. From the Available Fields section, select o Job Posting Site: Status o Job
Posting Site: Technical Site
6. Click Add.
7. From the Selected Fields section, select Job Posting: Job Posting Number and click
Remove.
8. Click OK, then click Save.

Finally, add fields to the Position related list on the Job Posting Site page layout.

1. From Setup, click Object Manager.


2. Click Job Posting Site, then Page Layouts.

Value
Field

Title Super Sales Rep

55
Department Sales

Field Value

Approval Status Approved

Location US

Job Description Sales rep to join the AW Computing team serving the eastern region of AMER

3. Click next to Job Posting Site Layout and select Edit.


4. Scroll down to the Job Postings related list and click in the header to edit it.
5. From the Available Fields section, select o Position: Status o Position: Title
6. Click Add.
7. From the Selected Fields section, select Job Posting: Job Posting Number and click

Field Value

Site Name Lots-O-Jobs

Job Posting Site URL www.Lotsojobs.com

Status Active

Remove.
8. Click OK, then Save.

Now let’s test what you’ve just done by creating a Job Posting record.

1. Click to open the App Launcher, then click Recruiting.


2. Click the Positions tab, then New, then enter the details of the new position.
3. Click Save.
4. Click the pencil icon at the top right of the screen.
5. Click Add more Items.
6. From the menu on the left, click All.
7. Next to Job Posting Sites, click the +.
8. Click Add 1 Nav item.
9. Click Save.
10. Click the Job Posting Sites tab, then New, then enter the details of the new Job
Posting Site.

56
11. Click Save.

Create a Self Relationship with the Position Object


Create a Lookup Relationship
When members of Ling Wu’s HR team are looking at a position in their recruiting
app, she would like each recruiter to be able to identify other open positions that
require similar skills or have similar job descriptions. This will allow recruiters to more
easily determine appropriate roles for candidates.

You can set this up for her by creating a lookup relationship. Lookup relationships
link two objects together. You can link an object with another standard or custom
object, or you can link an object with itself—that’s called a self relationship.

Start by creating a self relationship with the Position object.


1. From Setup, click Object Manager.
2. Click Position.
3. Click Fields & Relationships, then New.
4. Select Lookup Relationship as the Data Type.
5. Click Next.
6. In the Related To picklist, select Position.
7. Click Next.
8. Change the Field Label to Related Position .
9. Change the Field Name to Related_Position .
10. Click Next, Next, and Next.
11. Change the Related List Label to Related Positions .
12. Click Save.

Add Lookup Filters


Now add lookup filters by department and record ID, to help recruiters narrow their
searches.

1. Click next to Related Position and select Edit.


2. In the Lookup Filter section, click Show Filter Settings.

3. Click and select Related Position from the first column, Department from the
second column, and click Insert.

57
4. For Operator, select equals.
5. For Value/Field, select Field.

6. Click and select Current Record: Position, then select Position: Department.

Now fill in the next row of filter criteria.

1. Click and select Position from the first column, Record ID from the second
column, and click Insert.
2. For Operator, select not equal to.
3. For Value/Field, select Field.

4. Click and select Current Lookup: Related Position, then select Related
Position: Record ID.

For If it doesn’t, display this error message on save, enter The related position
must be in the same department. You cannot relate a position to itself .
5. For Filter Type, ensure Required is selected.
6.

7. Click Save.

Now let’s test what you’ve just done by viewing a position in the Recruiting App.

1. Click to open the App Launcher, then click Recruiting.

58
2. Click Positions, then New, then enter the details of the new position.

3. Click the Related Position field and select Super Sales Rep.
4. Click Save.
5. Notice that that Super Sales Rep appears as a related position for Awesome Sales
Rep. (You may need to refresh the page.)

Value
Field

Title Awesome Sales Rep

Department Sales

Approval Status Approved

Location US

Job Description Sales rep to join the AW Computing team serving the western region of AMER

59
Create Custom Recruiting Fields
In this step, you help HR recruiters monitor the interview process by adding custom
fields to capture interview outcome information. Ling Wu wants interviewers to rate
and comment on each candidate in the areas of core competencies and leadership
skills and give feedback on whether they recommend a candidate for hire. To do this,
set up some custom fields on the Review object.

Create Custom Picklists


Create custom recruiting picklist fields for Core Competencies and Leadership Skills
so interviewers can quickly rate candidates on a scale of 1 to 5.

1. From Setup, click Object Manager and select Review.


2. Click Fields & Relationships, then New.
3. Select Picklist as the Data Type and click Next.

60
4. For Field Label enter Core Competencies .
5. Select Enter values, with each value separated by a new line
and enter these values:
o o 1
o o
o 2

6. For 3 Help Text, For this category, rate candidate on a scale of 1 (lowest) to
enter
4
. 5 (highest)

7. Click 5 Next, Next, then Save & New.

8. Follow steps 3 through 7 and create two more picklists with Leadership Skills and
Experience as the field labels.

Create Custom Text Fields


Next, create custom text fields for Core Competencies, Experience, and Leadership
Skills, so interviewers can add comments on the candidates.

1. Select the Text Area as the Data Type, then click Next.
2. For Field Label, enter Core Competencies Comments .
3. Click Next, Next, then Save & New.
4. Follow steps 1 through 3 and create two more text areas with Leadership Skills
Comments and Experience Comments as the field labels.

Create a checkbox field allowing interviewers to recommend candidates for hire.

1. Select Checkbox as the Data Type and click Next.


2. For Field Label, enter Recommend for Hire .
3. For Help Text, enter Do you recommend that we hire this candidate?
4. Click Next, Next, then Save & New.

Now create a text field allowing interviewers to give reasons they recommend a
candidate.

1. Select the Text Area as the Data Type and click Next.
2. For Field Label, enter Reason Recommended .
3. Click Next, Next, then Save & New.

Next, create a lookup relationship field for Interviewer.

1. Select Lookup Relationship as the Data Type and click Next.


2. For Related To, select Interviewer and click Next.
3. For Field Label, enter Interviewer .

61
4. Click Next, Next, Next, then Save & New.
Finally, create a master-detail relationship field for Job Application.

1. Select Master-Detail Relationship as the Data Type and click Next.


2. For Related to, enter Job Application .
3. Click Next.
4. For Field Label, enter Job Application .
5. Click Next, Next, Next and Save.

62
PRACTICAL 6: Data Security

Create a Reviews Tab


To get this project rolling, start by creating a tab for the Review object in the AW
Computing Recruiting app.

1. From Setup, enter Tabs in the Quick Find box, then select Tabs.
2. In the Custom Object Tabs section, click New.
3. From the Object picklist, select Review.

4. Click and select Thermometer.


5. Click Next.
6. Leave the profile as is and click Next.
7. In the Add to Custom Apps section:
o Deselect Include Tab.
o Select Append tab to users’ existing personal customizations.
8. Click Save.

63
Next, customize what users see by reordering the tabs for the Recruiting app.
1. From Setup, enter App Manager in the Quick Find box, then select App
Manager.

2. Click next to the Recruiting entry and select Edit.


3. Click Navigation Items.
4. From the Available Items list, hold control/command and select Job Posting

Sites and Reviews, then click to add the tabs to the Selected Items list
5. In the Selected Items section, rearrange the tabs by clicking on each and using
the up or down arrows to put the tabs in this order: o Home
o Positions o Candidates o Job
Applications o Interviewers o
Reviews o Job Posting Sites o
Reports o Dashboards o
Chatter

6. Click Save, then click Back .

Create an Object-Specific Quick Action


With object-specific actions, users can:

• Create records that have automatic relationships to other records.


• Make updates to specific records.
• Interact with records in ways that you define.

Quick actions share qualities with custom buttons and links, with a key difference:
simplicity. They create a more streamlined experience between mobile and desktop.
And action creation can be completely declarative.

Object-specific actions can update existing records and create ones that are
automatically associated with related information. In the Recruiting app, set up an
object-specific quick action to create a job application from a candidate record.

Create the Quick Action


From Setup, click Object Manager, then Candidate.

1. Click Buttons, Links, and Actions.

64
2. Click New Action and fill in the details.

3. Click Save.

Next,
Value
Field

Action Type Create a Record

Target Object Job Application

Label New Job App

Description Action to create a job application from a Candidate record. This description is not visible to

customize the action’s layout.

1. Drag the Status field from the palette and drop it on the layout below, to the right of
the Candidate field.
2. Click Save.

Set a predefined value for the Stage field.

1. Click New in the Predefined Field Values list on the action detail page.
2. In the Field Information section, select Stage from the Field Name picklist.
3. In the Specify New Field Value section, select New from the picklist.
4. Click Save.

Now, add the action to the Candidate page layout.

1. While you’re still viewing Candidate in the Object Manager, click Page Layouts.

2. Click next to Candidate Layout, then select Edit.


3. Under Salesforce Mobile and Lightning Experience Actions, click the override the
predefined actions link.

65
4. Click Mobile & Lightning Actions in the palette.
5. Drag the New Job App action to the Salesforce Mobile and Lightning Experience
Actions section of the page layout and place it after POST.
6. Click Save.

Test the Quick Action


Now that you’ve created a new action and customized its layout, test it.

1. Click to open the App Launcher, then click Recruiting.


2. Click the Candidates tab.
3. Click New and create a new candidate record, enter a first and last name, and click
Save.
4. Refresh your browser and see the New Job App button on the newly created
candidate record.

5. Click New Job App.


6. Click in the Position field and select + New Position.
7. Enter a title and click Save, click Save again.

Customize the Review Page Layout


Create Customized Page Layouts
A page layout determines the fields, sections, related lists, and buttons that appear
when users view or edit a record. You can modify an object’s default page layout or
create a new one.
Giving the HR team easier access to the records they need further empowers them to
match the right candidates with the right jobs. Now customize the Review page
layout to help the team easily access information from the interviewing process.

66
First, create a new section for Core Competencies on the page layout.

1. From Setup, click Object Manager, then Review.


2. Click Page Layouts.

3. Click next to Review Layout and select Edit.


4. Add a new section to the page layout by dragging Section from the palette to fall
below the Information section.
5. Fill in the section properties: o For Section Name, enter . o For
Layout, select 1-Column. Core Competencies

6. Click OK.
7. Drag the Core Competencies and Core Competencies Comments fields from the
Information section into the Core Competencies section.

Next, create a new section for Leadership Skills.

1. Drag Section from the palette to fall below the Core


Competencies section. Leadership Skills
2. For Section Name, enter .
3. Under Layout, select 1-Column.
4. Click OK.
5. Drag the Leadership Skills and Leadership Skills Comments fields from the
Information section into the Leadership Skills section.

Now create a new section for Experience.

1. Drag Section from the palette to fall below the Leadership Skills section.
2. For Section Name, enter Experience .
3. Under Layout, select 1-Column.
4. Click OK.
5. Drag the Experience and Experience Comments fields from the Information section
into the Experience section.

Create a new section for Recommendation.

1. Drag Section from the palette to below the Experience section.


2. For Section Name, enter Recommendation .
3. Under Layout, select 1-Column.
4. Click OK.
5. Drag the Recommend for Hire and Reason Recommended fields from the
Information section into the Recommendation section.
6. Select the Core Competencies field, then hold down CTRL or Command and select
the Leadership Skills and Experience fields as well.

67
7. Hover over one of the highlighted fields and click to edit them all.
8. For Field Properties, select Required for all three fields.
9. Click OK.
10. Click Save.

Create a Custom Candidate Record Page


When you generate a custom record page for the Candidate object, you can easily
add, remove, or reorder Lightning components. That’s the next step in improving the
Recruiting app for Ling Wu’s team.

Add a Lightning Component


Start by adding the Recent Items component to the Candidate record page.

1. Click to open the App Launcher, then click Recruiting.


2. Click the Candidates tab.
3. Click New to create a Candidate record, enter a first and last name, then click Save.

4. Click to reveal the Setup menu, then select Edit Page. This is a shortcut to
get into App Builder and clone the default record page for the Candidate object.
Notice the headings on this page: Lightning App Builder and Candidate Record Page.
5. Drag the Recent Items Lightning component from the list of standard components to
the top of the Page Canvas, above the component featuring the Related and
Details tabs.

68
6. Click Save, Activate, Assign as Org Default.

7. Select Desktop and phone on the Assign Form Factor page.

8. Click Next.

9. Click Save.

Now view the new record page. Click Back to return to the Candidate record.
The Recent Items component, showing recently added candidates, appears at the top
of the record page. If you don’t see it, refresh your browser.

Create a Custom Candidate Compact Layout


The compact layout controls which fields appear in the Highlights Panel component
on the record page. Create a custom compact layout that includes more than just the
candidate’s name.

1. Click and select Setup.


2. Click the Object Manager tab, and select Candidate.
3. Click Compact Layouts, then click New and fill in the details:
4. Click Save.
5. Click Compact Layout Assignment, then Edit Assignment.
6. Set the new compact layout you just created as the primary compact layout.
7. Click Save.

Create Record Types on the Position Object


Ling Wu would like hiring managers at AW Computing to be able to create new
positions only for their own departments. For example, she wants technical hiring
managers to create positions only for their IT and Engineering departments.

Field Value

Label Includes Candidate Name

69
You Value
Field
can do
this Selected Fields Candidate Number
with a First Name
Last Name

custom record type. Record types determine which features are available on page
layouts, including fields, location, and properties; and they limit picklist options. The
record type you create here limits the picklist choices available to hiring managers.

Create Profiles
Before diving in to creating record types, however, there’s a bit of prework to do. The
recruiting team needs a couple of profiles to assign to users, depending on whether
they do technical or nontechnical recruiting. Let’s set those up.

1. From Setup, enter Profiles in the Quick Find box and select Profiles.
2. From the list of profiles, select Standard User. (Choose S from the alphabet list to
narrow the list of options.)
3. Click Clone next to Standard User.
4. For Profile Name, enter Recruiter: Technical .
5. Click Save.
6. On the Recruiter: Technical profile page, click Clone.
7. For Profile Name, enter Recruiter: Nontechnical .
8. Click Save.

Create Record Types


Now create a new Technical Position record type.

1. From Setup, click Object Manager.


2. Click Position, then Record Types.
3. Click New and fill in the details.

4. Deselect the checkbox next to Make Available and select these profiles:
o Recruiter: Technical o
System
Administrator
5. Click Next, then Save.
6. Under Picklists Available for Editing, click Edit next to Department.
7. Remove all but IT and Engineering from the Selected Values column.

70
8. Click Save.

Now create a Nontechnical Position record type and make it accessible to different
profiles.

Field Value

Existing Record Type Master

Record Type Label Technical Position

Description Use this record type for technical positions only.

Active Select

1. While you’re still viewing the Position object in the Object Manager, choose Record
Types.
2. Click New and fill in the details.

3. Ensure the checkbox next to Make Available is deselected, then select these profiles:
o Recruiter: Nontechnical o
System Administrator
4. Click Next, then Save.
5. Under Picklists Available for Editing, click Edit next to Department.
6. Remove all but Finance, Support, and Sales from the Selected Values column.
7. Click Save.
Next, add the Record Type field to the Position page layout.

Field Value

Existing Record Type Master

Record Type Label Nontechnical Position

Description Use this record type for nontechnical positions only.

Active Select

1. While you’re still viewing the Position object in the Object Manager, choose Page
Layouts.

2. Click next to Position Layout and select Edit.


3. Drag the Record Type field from the palette into the Information section and drop it
just below the Department field.

71
4. Click Save.

Customize the Position Page Layout


Create Fields on the Position Object
You’ve limited the positions that individual hiring managers can create. Ling Wu
would like the technical hiring managers to go deeper and specify the skills they’d
like for their candidates to have, such as programming languages or operating
systems.

To accomplish this, you can create a few new fields and a new page layout to reflect
differences between technical and nontechnical positions.

First, create fields for Operating System and Programming Language.

1. If you’ve navigated away from the Position object, from Setup, click Object Manager
and click Position.
2. Click Fields & Relationships, then New.
3. Select Picklist as the Data Type and click Next.
4. For Field Label enter Operating Systems .
5. Select Enter values, with each value separated by a new line and enter these
values
o Windows o Unix
o Mac
6. Click Next.
7. Select and deselect the Visible checkbox to clear the column, then select these
profiles:
o Recruiter:
Technical o
System
Administrator
8. Click Next.
9. Deselect any checked page layouts, then click Save & New.
Now create a second new field.

1. Choose Picklist as the Data Type, and click Next.


2. For Field Label enter Programming Languages .
3. Select Enter values, with each value separated by a new line and enter these
values:

72
o COBOL o FORTRAN
o .Net o Java o PHP
o Perl o Python
4. Click Next.
5. Select and deselect the Visible checkbox to clear the column, then select these
profiles:
o Recruiter:
Technical o
System
Administrator
6. Click Next.
7. Deselect any checked page layouts, then click Save.

Work with Page Layouts


Next, create a new page layout for technical positions that shows the Operating
System and Programming Language fields in a separate section.

1. While you’re still viewing the Position object in the Object Manager, choose Page
Layouts.
2. Click New.
3. In the Existing Page Layout picklist, select Position Layout.
4. Enter Technical Position Layout as the Page Layout Name.
5. Click Save.
6. Drag Section from the palette and drop it just below the Position
Detail section. Technical Skills
7. For Section Name, enter .
8. For Layout, select 1-Column.
9. Click OK.
10. Drag the Operating Systems and Programming Languages fields from the palette
into the new Technical Skills section.
11. Click Save.

Finally, edit the page layout assignments for the Position object so the Recruiter:
Technical and System Administrator profiles always use the Technical Position page
layout.

1. Click Page Layout Assignment.


2. Click Edit Assignment.
3. For the Recruiter: Technical profile, click the cell in the Technical Position column.
4. From the Page Layout To Use picklist, select Technical Position Layout.
5. For the System Administrator profile, click the cell in the Technical Position column.
6. From the Page Layout To Use picklist, select Technical Position Layout.

73
7. Click Save.

Enable Chatter on the Review Object


Chatter is a powerful tool. It enables information sharing, collaboration, visibility,
general and record-specific conversations, feed tracking for specific records or
individuals, and the option to create public or private groups.

By enabling feed tracking on objects, recruiters can track changes to records for key
fields. They can see updates for records they follow in their Chatter feed, go to a
specific record, and @mention other Chatter users to get their attention. It’s an ideal
way for the HR team to communicate about candidates.

Enable Chatter Feed Tracking


Enable Chatter feed tracking on the Review object.

1. From Setup, enter Feed Tracking in the Quick Find box, then select Feed Tracking.
2. In the list of available objects, click Review.
3. Select Enable Feed Tracking.
4. Select these fields:
o Core Competencies o
Experience o Interviewer o
Job Application o
Leadership Skills o Reason
Recommended o
Recommend for Hire
5. Click Save.

PRACTICAL 7: Visualforce Basics

74
Create Custom Profiles Learning
Objectives
In this project, you’ll:

• Update field-level security and create permission sets in an HR recruiting app so that
sensitive data can be viewed only by those who need it.
• Further restrict data access in the app by changing sharing settings.

Introduction
For this project, you continue customizing AW Computing’s Recruiting app, which the
HR team uses as they work to place applicants into open positions in the company.
Ling Wu, the vice president of HR, wants to be sure that those who are using the app
only see the data they need to see.

The first step is creating an HR Recruiter profile and setting up the required data
access according to Ling’s specifications. It’s best practice to not assign standard
profiles to users. Instead, even if you’re not making any changes, clone the Standard
Profiles and assign the clones to users. That way, if a user needs permissions or
access to a custom object in the future, the cloned profiles can be updated easily.

75
Before you can do this project, you must complete the Build a Data Model for a
Recruiting App, Customize the User Interface for a Recruiting App, and Improve Data
Quality for a Recruiting App projects. The work you do here builds on the work you
complete in those projects.

Create Profiles
Before creating the new profile, customize how profiles are viewed.

1. From Setup enter User Management Settings in the Quick Find box, and select User
Management Settings.

Object Read Create Edit

76
Candidate
✓ ✓ ✓
2. Set Enhanced Profile User Interface to Disabled (if it’s not already).

Now create an HR Recruiter profile and set its object permissions.

1. From Setup enter Profiles in the Quick Find box, and select Profiles.
2. From the list of profiles, find Standard User.
3. Click Clone.

HR Recruiter

4. For Profile Name, enter .


5. Click Save.
6. While still on the HR Recruiter profile page, then click Edit.
7. Scroll down to Custom Object Permissions and change the Basic Access for each
object to reflect the table below, provided by the Ling.
8. Click Save.

77
Object Read Create Edit

Interviewers ✓ ✓ ✓

Job Applications ✓ ✓ ✓

Job Postings ✓ ✓ ✓

Job Posting Sites ✓ ✓ ✓

Positions ✓ ✓ ✓

Reviews ✓ ✓ ✓

Restrict Data Access with Field-Level Security, Permission


Sets, and Sharing Settings Create Permission Sets
Permission sets grant additional permissions to specific users, on top of their existing
profile permissions, without having to modify existing profiles, create new profiles, or
grant an administrator profile where it's not necessary.

Create a new permission set for hiring managers.

1. From Setup, enter Permission Sets in the Quick Find box, and select Permission
Sets.
2. Click New, and enter the details. o Field Label: o
Description: Hiring Manager
Temporary permission set for those Hiring Managers that need to
interview candidates for positions in their department
Copy

o License: Salesforce
3. Click Save.
4. Click Assigned Apps in the Apps section, then click Edit.
5. Select Recruiting from the Available Apps list and click Add.

Object Tab Setting Read Create

Interviewers Visible
✓ ✓

Job Visible ✓
Applications

Job Postings ✓

78
6. Click Save.

7. Click the next to Assigned Apps and select Object Settings.


8. Select Interviewers from the object list, and click Edit.
9. Select Visible under Tab Settings.
10. Select Read, Create, and Edit from the Object Permissions list.
11. Click Save.
12. Repeat steps 8-11 for the Job Applications, Job Postings, Job Posting
Sites, Positions, and Reviews objects. Set the permissions to reflect what is shown in
this table provided by Ling Wu.

Modify Field-Level Security


All standard objects have a predefined set of fields to capture common business
information. While they can’t be deleted, field-level security can make them invisible.
Field-level security controls which fields a profile or permission set can view and edit,
overrides any less-restrictive field access, and controls settings in page layouts and
search layouts.

79
Object Tab Setting Read Create

Job Posting Visible ✓


Sites

Positions Visible ✓ ✓

Reviews ✓ ✓

Field-level security is universally enforced regardless of how a user is accessing


Salesforce—page layout, related lists, report, and so forth. For this reason, field-level
security is the preferred way to secure sensitive and confidential information, like
salary ranges HR recruiters and hiring managers work with in their app.

Start by setting field-level security for Salary Range field.

1. From Setup, click Object Manager, and select Position. 2.


Click Fields & Relationships, then select Salary Range.
3. Click Set Field-Level Security.
4. For HR Recruiter and System Administrator, select Visible. (Ensure Visible is
deselected for all other profiles.)
5. Click Save.

Now set permissions.

1. From Setup, enter Permission Sets in the Quick Find box, and select Permission
Sets.
2. Select Hiring Manager.
3. Click Object Settings in the Apps section.
4. Click Positions from the list of object names, and click Edit.
5. Under Field Permissions, select Read Access and Edit Access for Salary

80
Range.
6. Click Save.

Create Sharing Settings


In order to access a record, users must have the appropriate object permission on
their profile or a permission set. By changing sharing settings from the
organizationwide defaults, you set the default level of access users have to records
they do not own in each object.

Ling Wu would like job postings to be the only HR custom object with public access.
Achieve this by changing the organization-wide default sharing
settings.

Set the organization-wide defaults for Recruiting app objects.

1. From Setup, enter Sharing Settings in the Quick Find box and select Sharing
Settings.
2. Click Edit in the Organization-Wide Defaults section.
3. Select Private for the Candidate object.
4. Select Private for the Interviewer object.
5. Select Private for the Job Application object.
6. Select Public Read Only for the Job Posting Site object.
7. Select Private for the Position object.
8. Click Save.

81
PRACTICAL 8: Reports & Dashboards for Lightning
Experience

Build a Process for Creating Interviewer Records


Learning Objectives
In this project, you’ll:

• Build processes in an HR recruiting app that streamline workflow for creating


interviewer records and approving new positions.
• Create a flow for the app to simplify the process of rating candidates and make the
rating process consistent.

Introduction
As AW Computing grows, you continue to look for new talent. You’ve already taken
care of a number of requests from Ling Wu, the vice president of Human Resources,

82
to improve her team’s recruiting app. Now she’d like you to add automation to the
mix.

Ling would like to automate the creation of interviewer records for hiring managers.
She’d like to establish an approval process for new positions. And she wants a more
user-friendly process for candidate scoring.

Before you can do this project, you must complete the Build a Data Model for a
Recruiting App, Customize the User Interface for a Recruiting App, Improve Data Quality
for a Recruiting App, and Keep Data Secure in a Recruiting App projects. The work you
do here builds on the work you complete in those projects.

Set Up a Process with Process Builder


The first thing to tackle is automated interviewer records. To set this up, you use the
Lightning Process Builder, which automates tasks using conditions and actions. With
Process Builder, you define evaluation criteria, determining which objects the rule
you create applies to. You establish the criteria that records must meet to trigger the
rule. Then you set up time triggers that determine when the process action fires.

Once your criteria are in place, immediate or time-dependent actions are set in
motion. These actions can include creating a record, updating a record, sending an
email, posting to Chatter, initiating a quick action, submitting for approval, launching
a flow, or calling an Apex class.

Start by creating a process with an immediate action.

1. From Setup, enter Process Builder in the Quick Find box and select Process Builder.
2. Click New, then click Continue with Process Builder. o
Name: Create Interviewer Record

o The process starts when: A record changes


3. Click Save.
4. Click + Add Object.
5. Select Position from the Object picklist.
6. Under Start the process, select only when a record is created.
7. Click Save.
8. Click + Add Criteria.
9. For Criteria Name enter Hiring Manager Not Blank .
10. Select Conditions are met under Criteria for Executing Actions, then set the
conditions.

83
o Field: Position:
Hiring_Manager__c o
Operator: Does Not
Equal o Type: Global
Constant
o Value: $GlobalConstant.Null

11. Click Save.


12. Under Immediate Actions, click + Add Action and fill in the details.
o Action Type:
Create a Create Interviewer Record
Record o
Action Name:
o Record Type: Interviewer
13. Under Set Field Values, relate the Employee field to the Hiring Manager.
o Field: Employee o Type: Field
Reference o Value:
Hiring_Manager__c o
Click Choose
14. Relate the interviewer record to the position record by clicking + Add Rowand filling
in the details.
o Field: Position o Type: Field
Reference o Value: Record

84
ID

15. Click Save, Activate, then Confirm.

16. Click .

Test the Process


Now that the process is activated, you can test the process you just created. But first,
add a hiring manager user.

1. From Setup, enter Users in the Quick Find box and select Users.
2. Click New Userand fill in the details.
3. Deselect Generate new password and notify user immediately.

85
Field Value

Profile Standard Platform User

4. Click Save.

Now test the process you created.

1. Click to open the App Launcher, then click Recruiting.


2. Click Positions, then New.
3. Select the record type Nontechnical Position, then click Next and fill in the details.

4. Click Save.
Value
Field

Title
Super Support Supervisor

Status New

Department Support

Location US

Hiring Kathy Cooper


Manager
Job
Description Manage a team that fields inquiries and cases from customers

Pay Grade S-200

5. Click the Related tab.


6. From the Interviewers related list, click an Interviewer number and note the values in
the Employee and Position fields.

86
Lay the Groundwork for an Approval Process
The next item on Ling Wu’s list is creating a system to approve positions before
posting them. She wants the recruiter’s manager and two other people to approve all
positions. She would like an additional approver to sign off on senior-level positions.
And she wants these approvers tracked on each position record.

You set up the approval process in the next step. First, you have some prep work to
take care of.

Create a Folder and Email Templates


Start by creating a couple of email templates and a folder to house them.

1. From Setup, enter Classic Email Templates in the Quick Find box, then select Classic
Email Templates.
2. Click Create New Folder.
3. Fill in the folder information: o Email Template
Folder Label: Position Request Responses

o Public Folder access: Read/Write


4. Ensure This folder is accessible by all users is selected.
5. Click Save.

Now create the necessary templates. First, set up a Position Approved email
template.

1. Click New Template.


2. Ensure Text is selected, then click Next and fill in the details.

3. Click Save.

87
Next, set up a Position Rejected email template.

1. Navigate back to the initial Classic Email Templates page, then click New Template.
2. Ensure Text is selected, then click Next and fill in the details.

3. Click Save.

Create Fields
Now build a few fields on the Position object to use in the approval process.

1. From Setup, click Object Manager and select Position.


2. Click Fields & Relationships, then click New.
3. Choose Lookup Relationship as the Data Type, and click Next.
4. Select User from the Related To picklist and click Next.
5. Enter Approver 1 as the Field Label.
6. Click Next, Next, then Save & New.
7. Repeat steps 3 through 6 using Approver 2 as the Field Label.
8. Repeat steps 3 through 5 using Approver 3 as the Field Label.
9. Click Next, Next, and Save.

Edit the Position Layout.

1. While still viewing Position in Object Manager, click Page Layouts.

2. Click next to Position Layout then click Edit.


3. Create a new section by dragging Section from the palette to fall under the
Experience & Education section.
4. Enter Approvers as the Section Name.
5. Select 1-Column for the layout, then click OK.
88
6. Drag the Approver 1, Approver 2, and Approver 3 fields from the Information
section to the Approvers section.
7. Click Save.

Create an Approval Process


Set Up a Multistep Approval Process
Your org is prepared, so you’re ready to set up the approval process for positions, as
Ling Wu requested. An approval process is an automated process that approves
records in Salesforce. When you build an approval process, you specify the steps
necessary for approval. A given step can apply to all records or just records with
certain attributes. You also specify who does the approving at each step and the
actions to take when a record is approved, rejected, or recalled.

Begin creating your multistep approval process.

1. From Setup, enter Approval Processes in the Quick Find box and select Approval
Processes.
2. Select Position from the Manage Approval Processes For picklist.
3. Click Create New Approval Process and select Use Standard Setup Wizard from
the picklist, then fill in the details.
4. For Process Name, enter New Position Approval .
5. For Description, enter:
All positions must be approved by the recruiter's manager and two to three
other approvers. These approvers are tracked in approver fields on the
Position object.
Copy

6. Click Next
7. At the picklist for Use this approval process if the following, select criteria are met.
8. Click Next.
9. In the Next Automated Approver Determined By picklist, select Manager.
10. Select Use Approver Field of Position Owner.
11. Select Administrators OR the currently assigned approver can edit records
during the approval process.
12. Click Next, then Next.

Select fields to display on the approval page layout.

1. Select these fields from the Available Fields list.

89
o Department o
Education o
Job Description
o Location o
Pay Grade o
Salary Range o
Skills Required

2. Click to add them to the Selected Fields list.

3. Select Display approval history information in addition to the fields selected


above.
4. Select Allow approvers to access the approval page only from within the
Salesforce application (Recommended).
5. Click Next.

90
6. As Submitter Type, select Owner from the Search picklist.
7. Ensure Position Owner is visible in the Allowed Submitters box.
8. Select Allow submitters to recall approval requests.
9. Click Save.
10. Select I'll do this later. Take me to the approval detail page to review what I've
just created.
11. Click Go!

Create Approval Steps


You’ve created the basic approval process. Next, create initial submission actions.

1. Under the Initial Submission Actions related list, click Add New, then select Field
Update.
2. For Name, enter Approval Status to Pending .
3. For Field to Update, select Approval Status from the picklist.
4. Under Specify New Field Value, select A specific value, then select Pending.
5. Click Save.

Now create approval steps.

1. Click New Approval Step under the Approval Steps


related list. Manager of Position Owner
2. For Name, enter .
3. Click Next.
4. Select All records should enter this step.
5. Click Next.
6. Select Automatically assign using the user field selected earlier (Manager).
7. Click Save.
8. Select No, I'll do this later. Take me to the approval process detail page to
review what I've just created.
9. Click Go!

Create the second step.

1. Click New Approval Step under the Approval Steps


related list. Position Approver 1
2. For Name, enter .
3. Click Next.
4. Select All records should enter this step.
5. Click Next.
6. Select Automatically assign to approver(s).

91
7. Select Related User from the picklist that appears, then select Approver 1 from the
secondary picklist.
8. For When multiple approvers are selected, select Approve or reject based on the
FIRST response.
9. For What should happen if the approver rejects this request? select Perform all
rejection actions for this step AND all final rejection actions (Final Rejection).
10. Click Save.
11. Select No, I'll do this later. Take me to the approval process detail page to
review what I've just created.
12. Click Go!

Create the third approval step.

1. Click New Approval Step under the Approval Steps.


2. For Name, enter Position Approver 2 .
3. Click Next.
4. Select All records should enter this step.
5. Click Next.
6. Select Automatically assign to approver(s).
7. Select Related User from the picklist that appears, then select Approver 2 from the
secondary picklist.
8. Click Save.
9. Select No, I'll do this later. Take me to the approval process detail page to
review what I've just created.
10. Click Go!

Create the fourth approval step.

1. Select New Approval Step under the Approval Steps related list and complete the
details.
2. For Name, enter Position Approver 3 .
3. Click Next.
4. Select Enter this step if the following criteria are met and enter the criteria.
o Field: Position: Salary Range. o Operator: equals

o Value: 90K-120K, 120K+ (Click to find it.)


5. Click Next.
6. Select Automatically assign to approver(s).
7. Select Related User from the picklist that appears, then select Approver 3 from the
secondary picklist.
8. Click Save.
9. Select No, I'll do this later. Take me to the approval process detail page to
review what I've just created.
10. Click Go!

92
Create the Final Actions
Now create the final actions: approval or rejection, along with their associated email
alerts.

1. Under the Final Approval Actions related list, click Add


New and select Approval Status to Approved Field Update.
2. For Name, enter .
3. For Field to Update, select Approval Status from the picklist.
4. Under Picklist Options, select A specific value, then choose Approved from the
picklist.
5. Click Save & New.

Fill in the details of the second field update.

1. For Name, enter Status to Open .


2. For Field to Update, select Status from the picklist.
3. Under Picklist Options, select A specific value, then select Open from the picklist.
4. Click Save.

Set up email alerts.

1. Under the Final Approval Actions related


list, click Add New Email position owner about approval and select Email Alert.
2. For Description, enter .

3. For Email Template, select Position Approved. (Click to find it.)


4. For Recipient Type, select Owner.

5. In the Available Recipients column, select Position Owner then click to move it
to the Selected Recipients column.
6. Click Save.

Now create final rejection actions.

1. Under the Final Rejection Actions related list, click Add


New and select Approval Status to Rejected Field Update.
2. For Name, enter .
3. For Field to Update, select Approval Status from the picklist.
4. Under Picklist Options, select A specific value, then select Not Approved from the
picklist.
5. Click Save & New.

Fill in the details for the next field update.


93
1. For Name, enter Status to Closed .
2. For Field to Update, select Status from the picklist.
3. Under Picklist Options, select A specific value, then select Closed from the picklist.
4. Click Save.

Now set up an email alert.

1. Under the Final Rejection Actions related list, click Add New, select Email Alert, and
fill in the details.
2. For Description, enter Email position owner about rejection .
3. For Email Template, select Position Rejected.

(Click to find it.)


4. For Recipient Type, select Owner from the picklist.

5. In the Available Recipients column, select Position Owner then click to move it
to the Selected Recipients column.
6. Click Save.

Set up another field update.

1. Under the Recall Actions related list, click Add New, and
select Field Approval Status to Recalled Update.
2. For Name, enter .
3. For Field to Update, select Approval Status from the picklist.
4. Under Picklist Options, select A specific value, then select Recalled from the picklist.
5. Click Save.
6. On the Approval Processes page, click Activate.
7. Click OK on the popup that appears.

Create a Process for Submitting Positions for Approval


Now that you’ve set up an approval process, continue to automate recruiting tasks by
creating a process that automatically submits new positions for approval.

Use Process Builder to Create a New Process


Use Process Builder to set up the process.

1. From Setup, enter Process Builder in the Quick Find box, then select Process

94
Builder.
2. Click New.
3. Select Continue in Process Builder when
prompted Submit New Positions for Approval
4. For Process Name, enter .
5. Under The process starts when, select A record changes from the picklist.
6. Click Save.
7. Click + Add Object and select Position from the Object picklist. (Do not worry if you
see a warning message that Position already has active record-change processes.)
8. For Start the process, select when a record is created or edited.
9. Click Save.
10. Click + Add Criteria.
11. For Criteria Name enter Position Ready for Approval .
Operator Type Value
Field

Status Equals Picklist New

Job Description Does not equal Global Constant $GlobalConstant.Null

Department Does not equal Global Constant $GlobalConstant.Null

Education Does not equal Global Constant $GlobalConstant.Null

Hiring_Manager__c Does not equal Global Constant $GlobalConstant.Null

Field Value

Action Type Submit for Approval

Action Name Submit Position for Approval

Object Position__c

Approval Process Specific approval process: New Position Approval – New_Position_Approval

12. For Criteria for Executing Actions, select Conditions are met.
13. Click + Add Row four times and set the conditions.

14. Click Save.


15. Under Immediate Actions, click Add Action and fill in the details.

16. Click Save, Activate, then Confirm.

17. Click .

95
Create a Candidate Rating Flow
Right now, the AW Computing hiring managers have to manually input a number
when they rate candidates. Ling Wu wants this process to be more user friendly, with
radio buttons.

To set this up for her, create a flow. Flows, which you build using Flow Builder,
automate business processes by executing logic, interacting with the Salesforce
database, and collecting data from users.

Create Radio Buttons for Experience


Begin creating the flow.

1. From Setup, enter Flows in the Quick Find box and select Flows.
2. Click New Flow.
3. Under Flow Types, select Screen Flow.
4. Click Create.
5. On the Canvas, click the Auto-Layout button, and select Freeform.
6. Add a screen element to prompt for the Review information by dragging Screen from
the palette onto the flow window.
7. For Label, enter New Review .

Now add radio button choices to rate a candidate on a scale of 1 (poor) to 5


(excellent) for Experience, along with a text box for comments.

1. Click Radio Buttons from the Input section of the palette on the left.
2. Enter Experience in the Label field. (The API Name field will default.)

Field Value
Fiel Value
API dName Excellent
API Name VeryGood
Choice Label Excellent
Choice Label Very Good
Data Type Number
Data Type Number
Choice Value 5
Choice Value 4

3. Set the Data Type to Number.


4. Click inside the Choice field, select +New Choice Resource, select Choice as the
Resource Type, and fill in the details.
96
5. Click Done.

Field Value

API Name Average

Choice Label Average

Data Type Number

Choice Value 3

6. Click +Add Choice four times.


7. Click inside the second Choice field and select +New Choice Resource.
8. Select Choice as the Resource Type, and fill in the details.

Field Value

API Name BelowAverage

Choice Label Below Average

Data Type Number

Choice Value 2

9. Click Done.
10. Click inside the third Choice field and select +New Choice Resource.
11. Select Choice as the Resource Type, and fill in the details.

Field Value

API Name Poor

Choice Label Poor

Data Type Number

Choice Value 1

12. Click Done.


13. Click inside the fourth Choice field and select +New Choice Resource.
14. Select Choice as the Resource Type, and fill in the details.

15. Click Done.


16. Click inside the fifth Choice field and select +New Choice Resource.
17. Select Choice as the Resource Type, and fill in the details.

97
18. Click Done.
19. Click Text from the Input section of the palette on the left.
20. For Label, enter Experience Comments . (The API Name field will default.)

You’ve got your first set of radio buttons, but don’t click Done on the screen just yet.

Create Radio Buttons for Leadership Skills


Now that radio buttons and text screen elements for Experience are added to the
flow, repeat the process for Leadership Skills.

1. Click Radio Buttons from the Input section of the palette on


the left. Leadership Skills
2. For Label, enter . (The API Name field will default.)
3. Set the Data Type to Number.
4. Click into the Choice field and select #Excellent.
5. Click +Add Choice four times.
6. Repeat step 4 to add Very Good, Average, Below Average, and Poor to the Choice
fields.
7. Click Text from the Input section of the palette on the
left. Leadership Skills Comments
8. For Label, enter . (The API Name field will default.)

There’s one more set of radio buttons to add—don’t click Done yet.

Create Radio Buttons for Core Competencies


Repeat the process once more for Core Competencies.

1. Click Radio Buttons from the Input section of the palette on


the left. Core Competencies
2. For Label, enter .
3. Set the Data Type to Number.
4. Click into the Choice field and select #Excellent.
5. Click +Add Choice four times.
6. Repeat step 4 to add Very Good, Average, Below Average, and Poor to the Choice
fields.
7. Click Text from the Input section of the palette on the
left. Core Competencies Comments
8. For Label, enter . (The API Name field will default.)

98
Add Screen Elements
Finally, add screen elements to the flow to create a checkbox and textbox so
recruiters can recommend a candidate for hire.

1. Click Checkbox from the Input section of the palette on the left.
2. For Label, enter Recommend for Hire . (API Name field will default.)
3. Click Text from the Input section of the palette on the left.
4. For Label, enter Reason Recommended . (API Name field will default.)
5. Click Done to close the screen.
Your New Review window should look like this. You can double-click the Screen
element to see the details and edit the Screen.

99
Set a Start Element
Now that you’ve created the flow, set its start element.

1. Connect the Start element to the New Review Screen element by clicking and holding
the Start circle and then dragging your cursor to the New Review element.
2. You will see that the two elements are connected by a solid line.

Next add a Create Records element to the flow.


100
1. Drag the Create Records element from the palette onto the flow
window. createReview
2. For Label enter , and let the API name default.
3. For How Many Records to Create, select one.
4. For How to Set the Record Fields select Use separate resources, and literal values.
5. For Object select Review.
6. Under Set Field Values for the Review click the Field box, and select Job_Application_
_c.

Field Value

Core_Competencies_Comments__c Core_Competencies_Comments

Core_Competencies__c Core_Competencies

Experience_Comments__c Experience_Comments

Experience__c Experience

Leadership_Skills_Comments__c Leadership_Skills_Comments

Leadership_Skills__c Leadership_Skills

Reason_Recommended__c Reason_Recommended

101
Recommend_for_Hire__c Recommend_for_Hire

7. For Value, click in the box, select +New Resource, and fill in the information.

8. Click Done.
9. Confirm that the Value that aligns with the Job_Application_ _c field now contains
{!varJobAppId}.
10. Click +Add Field 8 times, then map the rest of the values according to the chart
below. (Hint: Type the first few letters of the Field or Value name, then click it when
you see it.)
Verify that your screen looks something like this.

Field Value

Resource Type Variable

API Name varJobAppId

Data Type Text

Available for Input Select

Available for Output Select

102
11. Click Done.

12. Connect the New Review screen element to the createReview element by
clicking and holding the New Review circle and then dragging your cursor to
the createReview element.

Add Screen Elements


Next, add a screen element to display a success message.

1. Drag Screen from the palette onto the flow window.


2. For Label, enter Record Created . (The API Name field will default.)
3. Under Display on the left, click
Display Text. RecordCreated .
4. For API Name, enter Your review record has been created successfully
5. In the text box enter . Leave the
Insert a resource field above the text box empty.
6. Click Done.
7. Connect the createReview element to the Record Created element.

Next, add a screen element to display faults for data elements.

1. Drag Screen from the palette onto the flow window.


2. For Label, enter Display Faults . (The API Name field will default.)
3. Click Display Text under Display on the left.
4. For API Name, enter Display_Fault_Message .
5. Click the Insert a resource... box and select $Flow under Global Variables.
6. Next, select FaultMessage, and click Done.
7. Connect the createReview element to the Display Faults element.
8. Verify that your Flow looks something like this.

103
9. Click Save.
10. For Flow Label, enter New Review .
11. Let the Flow API Name field default.
12. Click Save.
13. Click Activate.

14. Click to return to Setup.

Deploy the Flow


Now that the New Review Flow is set up, create a custom button for launching it.

1. From Setup, click Object Manager and select Job Application.


2. Click Buttons, Links, and Actions.
3. Select New Button or Link.
4. For Label, enter New Review .
5. Select Detail Page Button as the display type.
6. Paste this link into the large text box below the Select Field Type field:
/flow/New_Review?varJobAppId={!Job_Application__c.Id}&retURL=/{!Job_Applica
tion__c.Id}
Copy

7. Click Save, then click OK on the popup.


Now add the New Review button to the page layout.

1. While still viewing Job Application in Object Manager, click Page Layouts.

2. Click next to Job Application Layout and select Edit.


3. Click Buttons in the page layout editor.
4. Drag the New Review button to the Custom Buttons section of the Job Application
Detail.

104
5. Click Save.

105

You might also like