Chapter 6: Expanding the Simple App Using Relationships
Adding Candidates to the Mix
Let's add a Candidate custom object to our app so we can manage the information about our
candidates. We'll also add fields to the object, modify the page layout properties, and create a
candidate record. The process for creating the Candidate custom object is almost identical to
the one we followed to create the Position custom object, so we'll zip through this quickly.
Try It Out: Creating the Candidate Object
To create our Candidate custom object, navigate back to Your
SetupName ➤ Setup
➤ Create ➤ Create ➤
➤ Objects,
Objects, click New Custom Object, and fill out the page according to the following table.
Table 8: Values for Defining the Candidate Object
Field Value
Label Candidate
Plural Label Candidates
Object Name Candidate
Description Represents an applicant who might apply for
one or more positions
Context-Sensitive Help Setting Open the standard [Link] Help &
Training window
Record Name Candidate Number
Data Type Auto Number
Display Format C-{00000}
Starting Number 00001
Allow Reports Yes
Allow Activities Yes
Track Field History Yes
Deployment Status Deployed
Add Notes & Attachments related list to Yes
default page layout
90
Expanding the Simple App Using Relationships
Field Value
Launch New Custom Tab Wizard after saving Yes
this custom object
To create the Candidates tab, select a Tab Style in the first step of the wizard, and then
accept all the defaults until you get to the Add to Custom Apps page. On this page, select only
the Recruiting App and click Save.
The Recruiting app now has three tabs: Home, Positions, and Candidates. Now let's add some
custom fields to the Candidate object.
Try It Out: Adding Fields to the Candidate Object
To create custom fields on the Candidate object, click
ClickYour
SetupName ➤ Setup
➤ Create ➤ Create ➤
➤ Objects,
Objects, and click Candidate to view its detail page. In the Custom Fields & Relationships
related list, use the New button to create custom fields according to the following table. Where
necessary, we've indicated some additional values you'll need to fill in. Otherwise, you can
simply accept all defaults.
One
Onedifference
difference you'll seesee
you'll in the Candidate
in the Candidateobjectobject
fields is that is
fields one of the
that three of Email—
fields them—Firstwill haveName
the ,
External
Last NameID option
, andselected.
Email—have This option allows the values
the External in this field
ID option to be indexed
selected. for search
This option allowsfrom
thethe
sidebar of these
values in the application.
fields to beIf we didn't select
indexed these from
for search value as
theexternal
sidebarID, of we'd only be able to
the application. If search for
we didn't
records basedvalues
select these on the asCandidate
externalNumberIDs, we'[Link]
Setting the Email
be able field for
to search as an external
records ID ison
based alsothe
going to help
us with importing data a little later in this chapter.
Candidate Number field. Setting the Email field as an external ID is also going to help us
with importing data a little later in this chapter.
Table 9: Candidate Object Custom Fields
Data Type Field Label Other Values
Text First Name Length: 50
External ID: Selected
Text Last Name Length: 50
External ID: Selected
Phone Phone
Email Email External ID: Selected
91
Chapter 6: Expanding the Simple App Using Relationships
Data Type Field Label Other Values
Text Street Length: 50
Text City Length: 50
Text State/Province Length: 50
Text Zip/Postal Code Length: 15
Text Country Length: 50
Text Current Employer Length: 50
Number Years of Experience Length: 2
Decimal Places: 0
Text SSN Length: 9
Picklist Education Picklist values:
• HS Diploma
• BA/BS
• MA/MS/MBA
• Ph.D.
• Post Doc
Checkbox Currently Employed Default: Checked
Checkbox US Citizen Default: Checked
Checkbox Visa Required Default: Unchecked
Phone Mobile
Phone Fax
Try It Out: Modifying the Candidate Page Layout Properties
To finish up with this object, let's organize all of our fields on the page layout and mark some
fields as required. To do so, let's go to the Candidate page layout page.
1. Click
Click Your
Setup Name ➤➤
➤ Create Setup ➤ Create ➤ Objects.
Objects,
2. Click Candidate.
3. In the Page Layouts related list, click Edit next to the Candidate Layout.
92
Expanding the Simple App Using Relationships
4. Create three new double-column sections below the Information section: Address,
Employment, and Additional Details. Drag the appropriate fields into them, as
shown in the Candidate Object Page Layout image, and don't forget to click Quick
Save so you can save your work as you go.
5. Set the First Name, Last Name, and Email fields to required as follows:
a. Use CTRL+click to select all three required fields.
b. Double-click your selection.
c. Select the Required checkbox in the Select All row, and click OK.
6. Click Save.
Your Candidate page layout should now look similar to the following screenshot.
Figure 33: Candidate Object Page Layout
Look at What We've Done
Here's a quick way to verify that you did everything correctly.
1. Click the Candidates tab.
93
Chapter 6: Expanding the Simple App Using Relationships
2. Click New.
3. Create a new record for a candidate named Ethan Tran.
4. Enter a value for each of the required fields. [Link] will not verify the email
address you enter in the Email field right now, so feel free to enter a fictitious one.
5. Click Save.
How does the page layout look? Are the fields where you want them?
If you page layout doesn't look quite right and you need to make a few adjustments, click the
Edit Layout link in the upper right corner.
Figure 34: Edit Layout Link
The Edit Layout link takes you directly to the page layout editor and lets you modify the page
you are currently viewing.
If you are able to successfully create a new candidate record and everything looks okay, let's
move on to the Job Application object!
Bringing Candidates and Positions Together with Job
Applications
Our app can track candidates and open positions, but there's a crucial element that's missing:
how do we know which candidates are interested in which positions? We can create lookup
relationship fields on the Candidate object that let recruiters specify the positions in which the
candidate is interested, but what if we want to track additional information, such as whether
the candidate is currently scheduled to interview for one of those positions? And wouldn't it