Building Applications With Force.com (DEV 401) Course Materials - Copy (2)Hh

December 10, 2017 | Author: Daniel Boca | Category: Salesforce.Com, Cloud Computing, Application Programming Interface, Metadata, Business Process
Share Embed Donate


Short Description

Download Building Applications With Force.com (DEV 401) Course Materials - Copy (2)Hh...

Description

AGENDA* DEV401: Building Applications with Force.com

Day One Introduction  Introduction  Introduction to Force.com 0-1 (10 min): Prepare Your Training Org

20 minutes

Welcome to Universal Containers

20 minutes

Designing Applications on the Force.com Platform  Basic Application Design  Building Applications on the Force.com Platform

140 minutes

Building Your Data Model  Custom Objects 3-1 (5 min): Create Custom Objects  Custom Fields 3-2 (20 min): Create Custom Fields  Object Relationships 3-3 (5 min): Create Lookup Relationships 3-4 (5 min): Create Master-Detail Relationships 3-5 (5 min): Create a Custom Junction Object 3-6 (5 min): Create a Lookup Filter  Schema Builder

80 minutes

Building Your User Interface  Custom Applications 4-1 (5 min): Create a Custom Application  Custom Tabs 4-2 (5 min): Create Custom Tabs  Custom Page Layouts 4-3 (10 min): Customize Page Layouts

IN

60 minutes

TE R

N

AL

U

SE

O N

LY

30 minutes

Introducing Business Logic  Formula Fields 5-1 (10 min): Create Formula Fields 5-2 (5 min): Create Cross-Object Formulas  Roll-Up Summary Fields 5-3 (10 min): Create Roll-Up Summary Fields

10 minutes

Migrating Configuration Changes  Migrating Configuration Changes  Change Sets

20 minutes

Accommodating Multiple Users in Your App  Things to Consider  Business Requirements for the Recruiting App

*Agenda subject to change.

i

AGENDA* DEV401: Building Applications with Force.com

Day Two Managing Your Users’ Experience  Licenses  Overview of Profiles  Profiles and Permissions 8-1 (15 min): Create Custom Profiles 8-2 (10 min): Create Permission Sets  Profiles and Access to Data 8-3 (5 min): Change Access Using Field-Level Security  Profiles and the User Interface 8-4 (10 min): Create Record Types 8-5 (15 min): Create Page Layouts 8-6 (10 min): Create Page Layouts and Record Types

120 minutes

Controlling Access to Records  Overview of Record Access  Record Ownership 9-1 (5 min.): Create Custom Object Queues  Organization Wide Defaults 9-2 (5 min): Set Organization-Wide Defaults 9-3 (5 min): Set Organization-Wide Defaults  Roles and “Groups” of Users 9-4 (5 min): Implement a Role Hierarchy 9-5 (5 min): Create a Public Group  Sharing 9-6 (5 min): Implement Manual Sharing 9-7 (10 min): Implement Sharing Rules

N

AL

U

SE

O N

LY

140 minutes

IN

60 minutes

TE R

9-8 (5 min): Create Apex Sharing Reasons

60 minutes

*Agenda subject to change.

Design Data Access Security  Access to Data Based on State 10-1 (20 min): Establish Data Access  Restricting Access to Highly Sensitive Data 10-2 (20 min): Restrict Data Access  Which Tool to Use? Building Business Processes  Typical Business Requirements  Features of the Force.com Platform that Can Help  Useful Operators and Functions 11-1 (10 min): Create Formula Fields to Display Images 11-2 (15 min): Create Formula Fields to Display Hyperlinks

ii

AGENDA* DEV401: Building Applications with Force.com

Day Three Building Business Processes (cont.)  Monitoring Processes

110 minutes

Preserving Data Quality  Enforcing Conditionally Required Fields 12-1 (10 min): Create Validation Rules 12-2 (10 min): Build Validation Rules to Enforce Conditionally Required Fields  Enforcing Proper Data Format 12-3 (10 min): Build Validation Rules to Enforce Data Format  Enforcing Consistency 12-4 (15 min): Build Validation Rules to Enforce Consistency  Preventing Data Loss 12-5 (10 min): Create Validation Rules to Prevent Data Loss (Optional)

80 minutes

Automating Business Processes with Workflow  Creating Workflow Rules 13-1 (15 min): Create Workflow Rules  Keeping Things Moving with Time-Dependent Workflow 13-2 (15 min): Set Up Time-Dependent Workflow 13-3 (15 min): Set Up Time-Dependent Workflow (Optional)

140 minutes

Automating Business Processes with Approval Processes  Multi-Step Approval Processes 14-1 (30 min): Create Multi-Step Approval Processes  Skipping Steps in Approval Processes 14-2 (15 min): Create Approval Processes that Skip Steps  Approval Processes with Parallel Approvers 14-3 (15 min) Create Parallel Approval Processes  Keeping Systems in Sync with Outbound Messaging 14-4 (10 min): Create Outbound Messages  Dynamic Approval Routing 14-5 (30 min): Create Dynamic Approval Processes (Optional)

IN

TE R

N

AL

U

SE

O N

LY

30 minutes

*Agenda subject to change.

iii

AGENDA* DEV401: Building Applications with Force.com

Day Four Increasing Data Quality using Flows  Understanding Visual Workflow  Creating Flows 15-1 (40 min): Create a Flow 15-2 (40 min): Create a New Version of a Flow  Deploying Flows 15-3 (10 min): Deploy a Flow

40 minutes

Auditing Processes  Auditing Configuration Changes 16-1 (10 min): Audit Changes Using Setup Audit Trail  Auditing Data 16-2 (10 min): Audit Changes to Data  Keeping Track of Unauthorized Changes

140 minutes

Data Management  Exporting Data  Deleting Data  Inserting Data  Updating Data  Salesforce Record IDs 17-1 (10 min): Mass Transfer Ownership of Records  Upsert Data  External IDs  Object Relationships  Tools for Data Management  Apex Data Loader 17-2 (15 min): Upload Positions  Which Tool Do You Use? 17-3 (10 min): Upsert Candidates 17-4 (10 min): Upsert Remaining Object Data (Optional)  Bulk API

IN

180 min

TE R

N

AL

U

SE

O N

LY

120 minutes

*Agenda subject to change.

Enhancing the User Interface Using Visualforce  What is Visualforce? 18-1 (15 min): Which is Best Solved Using Visualforce?  Creating a Visualforce Page 18-2 (10 min): Create a Visualforce Page  Parts of Visualforce page 18-3 (10 min): Use a Standard Controller and Override a Standard Page 18-4 (15 min): Find Components and Their Attributes

iv

AGENDA* DEV401: Building Applications with Force.com

Day Five Enhancing the User Interface Using Visualforce (cont.) 18-5 (15 min): Complete the Offer Quick Edit Page 18-6 (20 min): Create the Candidate Page 18-7 (15 min): Create the Review Page (Optional)  Templates in Visualforce 18-8 (25 min): Create the Console Page Template and Job Application Console Page  Static Resources in Visualforce 18-9 (10 min): Add the Confidential Image to the Job Application Console  Visualforce Design Recommendations

120 min

Additional Uses for Visualforce  Applying CSS to a Visualforce page  Including a website and list of records in a Visualforce page 19-1 (15 min): Add Web Content to a Visualforce Page 19-2 (15 min): Create a Mass Edit List Page (Optional)  Deploying a Flow with Visualforce 19-3 (10 min): Deploy a Flow using Visualforce  Including Visualforce in a page layout 19-4 (15 min): Display the Job Site  Using JavaScript and AJAX to extend Visualforce 19-5 (20 min): Create a Partial Page Update for Conditional Fields (Optional)  Exposing a Visualforce page to the Internet  Visualforce pages on a mobile device

IN

TE R

N

AL

U

SE

O N

LY

60 min

*Agenda subject to change.

v

IN

TE

R

N

AL

U

SE

O

N

LY

Introduction to Force.com

@SalesforceCert www.salesforce.com/training © Copyright 2013 salesforce.com, inc. All rights reserved. Various trademarks held by their respective owners.

LY N O SE

© Copyright 2013 salesforce.com, inc.

U

All rights reserved.

AL

Printed in the U.S.A.

TE

R

N

This document contains proprietary information of salesforce.com, inc., it is provided under a license agreement containing restrictions on use, duplication and disclosure and is also protected by copyright law. Permission is granted to customers of salesforce.com, inc. to use and modify this document for their internal business purposes only. Resale of this document or its contents is prohibited.

IN

The information in this document is subject to change without notice. Should you find any problems or errors, please log a case from the Support link on the Salesforce home page. Salesforce.com, inc. does not warrant that this document is error- free. "Salesforce.com" and the "no software" logo are registered trademarks of salesforce.com, inc. Other names used may be marks of their respective owners.

2

Safe Harbor Statement Safe harbor statement under the Private Securities Litigation Reform Act of 1995:

SE

O

N

LY

This presentation may contain forward-looking statements that involve risks, uncertainties, and assumptions. If any such uncertainties materialize or if any of the assumptions proves incorrect, the results of salesforce.com, inc. could differ materially from the results expressed or implied by the forward-looking statements we make. All statements other than statements of historical fact could be deemed forward-looking, including any projections of product or service availability, subscriber growth, earnings, revenues, or other financial items and any statements regarding strategies or plans of management for future operations, statements of belief, any statements concerning new, planned, or upgraded services or technology developments and customer contracts or use of our services.

IN

TE

R

N

AL

U

The risks and uncertainties referred to above include – but are not limited to – risks associated with developing and delivering new functionality for our service, new products and services, our new business model, our past operating losses, possible fluctuations in our operating results and rate of growth, interruptions or delays in our Web hosting, breach of our security measures, the outcome of any litigation, risks associated with completed and any possible mergers and acquisitions, the immature market in which we operate, our relatively limited operating history, our ability to expand, retain, and motivate our employees and manage our growth, new releases of our service and successful customer deployment, our limited history reselling non-salesforce.com products, and utilization and selling to larger enterprise customers. Further information on potential factors that could affect the financial results of salesforce.com, inc. is included in our annual report on Form 10-K for the most recent fiscal year and in our quarterly report on Form 10-Q for the most recent fiscal quarter. These documents and others containing important disclosures are available on the SEC Filings section of the Investor Information section of our Web site. Any unreleased services or features referenced in this or other presentations, press releases or public statements are not currently available and may not be delivered on time or at all. Customers who purchase our services should make the purchase decisions based upon features that are currently available. Salesforce.com, inc. assumes no obligation and does not intend to update these forward-looking statements. 3

Objectives By the end of this module, you will be able to:

N

LY

 Describe what you can do with Force.com and how it is related to Salesforce CRM and Database.com.

O

 Describe key features of working in the cloud.

IN

TE

R

N

AL

U

SE

 Describe the development tools available for the Force.com platform.

4

Module Agenda

 Development Tools

IN

TE

R

N

AL

U

SE

O

 Preparing your Org for Training

N

 Force.com and Cloud Computing

LY

 Introductions

5

Introductions

Facilities

SE

O

N

LY

 Emergency Exits  Restrooms, Break Room, etc.

U

Courseware and Agenda

IN

TE

R

N

AL

 Layout of the Manual and Exercises  This Week’s Agenda

Your Fellow Students  Your Name  Goals for Your Time in this Class 6

Module Agenda  Introductions  Development Tools

IN

TE

R

N

AL

U

SE

O

 Preparing your Org for Training

N

LY

 Force.com and Cloud Computing

7

What is Force.com?

LY

Force.com is a cloud-based platform for building applications.

SE

CRM Applications

O

N

 CRM Sales Cloud and Service Cloud applications are built on the Force.com platform. They include application specific:

AL

U

– Data model.

– Business logic.

N

Chatter

R

– User interface.

Database.com

TE IN

Force.com

 Chatter is a social enterprise application included with the Sales Cloud and Service Cloud applications as well as Force.com.

 Database.com is the cloud-based database platform underlying the Force.com platform. It includes: – Security model. – Integration mechanisms. 8

We do Infrastructure Services

We do Application Services

Network

Security

Storage

Sharing

Availability

Operating System

Integration

Monitoring

Database

TE

Why Go Cloud-based?

Customization

Patch Mgmt

App Server

Web Services

Upgrades

Web Server

API

Backup

Data Center

Multi-Language

NOC

YOU focus on innovation

IN

R

N

AL

U

SE

O

N

LY

We do Operations Services

Authentication

Build your data model Build your business logic Build your user interface

9

What are Some Attributes of Cloud Computing?

SE

O

N

LY

Multi-tenant Subscription No large start-up fee Fixed, predictable cost Scales with your business Automatic upgrades

IN

TE

R

N

AL

U

     

10

How Do Automatic Upgrades Work?  Three product releases per year.

N

LY

 Upgrading is automatic and free for all customers.

SE

O

 Backwards compatibility for the API and any customizations you make.

IN

TE

R

N

AL

U

 Development environments are upgraded early for testing.

11

Module Agenda

 Development Tools

IN

TE

R

N

AL

U

SE

O

 Preparing your Org for Training

N

 Force.com and Cloud Computing

LY

 Introductions

12

How Do You Configure, Build, and Integrate?

LY

 Customize and build within Force.com using:

N

CRM Applications

 Configure using declarative (point-and-click) interface.

O

• Declarative interface. • Apex programming language.

SE

Chatter

 Integrate with external systems using:

R

N

Force.com

AL

U

• Visualforce user interface framework (not available in Database.com).

IN

Database.com

TE

• Declarative interface. • Apex programming language • A Force.com API.

13

Declarative or Programmatic: Which Should You Use?  Make the most of Force.com declarative capabilities.

 Use programmatic customizations for:

– Faster than coding

LY

– Greater flexibility and more complex logic.

SE

– More control over user interface.

AL

– More integration options.

TE

R

N

– No coding skills required

U

– Enables leveraging of updates to Force.com feature set

O

N

– Easier to maintain

IN

Use programmatic customizations to build on declarative capabilities, not to re-create them.

14

Where Can You Find Documentation?

LY

Declarative focus: Help & Training

N

 Documentation

O

 Knowledge Articles

 Forums

IN

 Documentation

TE

R

N

Programmatic focus: http://developer.force.com

AL

U

SE

 Training

 Code share  Sign up for a free developer edition org 15

Declarative and Programmatic: Where Do You Use Them? Applications Tabs Page Layouts Record Types

Force.com Pages Web Controls Sites

O

N

LY

User Interface

Workflow Validation Rules Approval Processes

N

AL

U

SE

Business Logic

IN

TE

R

Objects Fields Relationships

Declarative Simplicity + Speed

Data Model

Force.com Page Controllers Force.com Code Web Services API REST API Web Services API Metadata API REST API Bulk API

Programmatic Custom Functionality + Integration 16

What Tools are Available for Application Development? Force.com Sandbox

Force.com IDE

U

SE

O

N

LY

Setup Menu

Dev, Test, & QA Environments

Programmatic Development Environment

TE

R

N

AL

Declarative Development Environment with Editors

IN

Metadata Migration Tools

Deployment Tools Resource Center & Community 17

What is Force.com Metadata?

LY

Metadata is data that describes configuration data.

SE

O

N

 Force.com metadata describes the customizations you make, declaratively or programmatically.

AL

U

 When you move changes from one environment to another, you are moving metadata. Run your code on our servers

TE

R

N

Configure our application services

IN

Salesforce Apps

Metadata ISV Apps

Custom Apps

18

Module Agenda

 Force.com and Cloud Computing

N

 Development Tools

LY

 Introductions

IN

TE

R

N

AL

U

SE

O

 Preparing your Org for Training

19

Improved Setup User Interface

LY

The Summer '13 release provides a new interface for personal and administrative setup tasks. Access Setup from the header

N

 On by default for new organizations

U

SE

O

 Opt-in for existing organizations

Redesigned personal settings area

TE

R

N

AL

Items have been reorganized by task type

IN

Enable or disable the new Setup interface: Customize | User Interface

20

Is Your Salesforce Training Org Ready?

O

N

To make sure you can access your org after class:

LY

When you login, Force.com verifies your identity and the IP address from which you are accessing the system.

SE

 Set your email address.

IN

TE

R

N

AL

U

 Configure your org or profile to accept requests from specific IP ranges.

21

0-1: Preparing Your Training Org Goal:

LY

Prepare your org for classroom activities and access after class.

N

Scenario:

TE

Tasks:

R

N

AL

U

SE

O

Universal Containers wants you to do development tasks for them. You have been given a Salesforce organization that you need to set up to begin your work. You want to make sure that all system messages from the org come to you and that you can access the org outside of your corporate network.  Reset the email address on your profile.

IN

10 min.

 Modify the valid IP ranges for the administrator profile.

22

LY

O N

Introduction to Force.com

IN

TE R

N

AL

U

SE

Exercise Guide

IN AL

N

TE R SE

U O N

LY

0-1: Preparing Your Training Org Goal: Prepare your org for classroom activities and access after class. Scenario: Universal Containers wants you to do development tasks for them. You have been given a Salesforce organization that you need to set up to begin your work. You want to make sure that all system messages from the org come to you and that you can access the org outside of your corporate network. 1. Reset the email address on your profile. 2. Modify the valid IP ranges for the administrator profile.

O N

Time:

LY

Tasks:

Instructions: 1. Reset the email address on your profile.

SE

10 minutes

AL

U

A. In a browser, go to http://login.salesforce.com. B. Enter the login credentials provided by your instructor. C. Click Admin User | My Settings | Personal | Personal Information.

D. Click Save.

TE R

N

i. Email: Enter an email you can access from the classroom ii. First Name: Enter your first name iii. Last Name: Enter your last name 2. Modify the valid IP ranges for the administrator profile.

IN

A. Click Setup | Manage Users | Profiles | System Administrator. B. Scroll down to Login IP Ranges and click New. i. Start IP Address: 000.000.000.000 ii. End IP Address: 255.255.255.255 C. Click Save.

©Copyright 2013 salesforce.com, inc. All rights reserved. Exercise Guide – Page i of i

Table of Contents 3

Module 1: Welcome to Universal Containers........................................................................

3

Module 2: Designing Applications on the Force.com Platform.............................................

4

Module 3: Building Your Data Model....................................................................................

8

Custom Objects.......................................................................................................

9

Custom Fields..........................................................................................................

14

LY

Course Agenda.....................................................................................................................

18

Schema Builder........................................................................................................

26

Module 4: Building Your User Interface................................................................................

29

Custom Applications and Custom Tabs...................................................................

30

SE

O N

Object Relationships................................................................................................

33

Module 5: Introducing Business Logic..................................................................................

36

Formula Fields.........................................................................................................

37

AL

U

Custom Page Layouts..............................................................................................

40

Module 6: Migrating Configuration Changes........................................................................

43

Module 7: Accommodating Multiple Users in Your App........................................................

46

Module 8: Managing Your Users• Experience......................................................................

48

Licenses...................................................................................................................

49

User Profiles and Permissions.................................................................................

51

Access to Data.........................................................................................................

56

Record Types and the User Interface......................................................................

58

Module 9: Controlling Access to Records.............................................................................

63

Overview of Record Access.....................................................................................

65

Record Ownership...................................................................................................

67

Organization-Wide Defaults.....................................................................................

69

Roles and Groups of Users......................................................................................

73

Sharing.....................................................................................................................

77

Module 10: Designing Data Access Security........................................................................

84

IN

TE R

N

Roll-Up Summary Fields..........................................................................................

85

Which Tool to Use?..................................................................................................

86

Module 11: Building Business Processes.............................................................................

89

Typical Business Requirements...............................................................................

90

Features of the Force.com Platform That Can Help................................................

91

Useful Operators and Functions..............................................................................

92

Monitoring Processes..............................................................................................

97

Module 12: Preserving Data Quality.....................................................................................

103

Enforcing Conditionally Required Fields..................................................................

104

Enforcing Proper Data Format.................................................................................

106

Enforcing Consistency.............................................................................................

107

Preventing Data Loss...............................................................................................

109

Module 13: Automating Business Processes with Workflow................................................

111

Workflow Rules........................................................................................................

112

Time-Dependent Workflow Rules............................................................................

114

Module 14: Automating Business Processes with Approval Processes...............................

118

AL

U

SE

O N

LY

Limiting Data Access...............................................................................................

119

Skipping Steps in Approval Processes....................................................................

121

Approval Processes with Parallel Approvers...........................................................

124

Keeping Systems in Sync with Outbound Messaging..............................................

126

Keeping Your Processes Flexible with Dynamic Approval Routing.........................

127

IN

TE R

N

Multi-Step Approval Processes................................................................................

Module 15: Automating Business Processes using Visual Workflow...................................

136

Understanding Visual Workflow...............................................................................

137

Creating Flows.........................................................................................................

138

Deploying Flows.......................................................................................................

141

Module 16: Auditing Processes............................................................................................

145

Auditing Configuration Changes..............................................................................

146

Auditing Data...........................................................................................................

147

Keeping Track of Unauthorized Changes................................................................

149

Module 17: Data Management.............................................................................................

153

Export data...............................................................................................................

153

154

Insert data................................................................................................................

155

Update data.............................................................................................................

156

Upsert data..............................................................................................................

160

Tools for data management.....................................................................................

164

Bulk API...................................................................................................................

169

Module 18: Enhancing the User Interface Using Visualforce...............................................

173

What is Visualforce?................................................................................................

174

Creating a Visualforce page.....................................................................................

177

Parts of a Visualforce page......................................................................................

181

Templates in Visualforce..........................................................................................

192

Visualforce design recommendations......................................................................

198

Module 19: Additional Uses for Visualforce..........................................................................

199

Training & Certification Resources.......................................................................................

215

IN

TE R

N

AL

U

SE

O N

LY

Delete data...............................................................................................................

O N

LY

Building Applications with Force.com

IN

TE R

N

AL

U

www.salesforce.com/training © Copyright 2013 salesforce.com, inc. All rights reserved. Various trademarks held by their respective owners.

SE

@SalesforceCert

© Copyright 2013 salesforce.com, inc. All rights reserved. Printed in the U.S.A. This document contains proprietary information of salesforce.com, inc., it is provided under a license agreement containing restrictions on use, duplication and disclosure and is also protected by copyright law. Permission is granted to customers of salesforce.com, inc. to use and modify this document for their internal business purposes only. Resale of this document or its contents is prohibited. The information in this document is subject to change without notice. Should you find any problems or errors, please log a case from the Support link on the Salesforce home page. Salesforce.com, inc. does not warrant that this document is error- free. "Salesforce.com" and the "no software" logo are registered trademarks of salesforce.com, inc. Other names used may be marks of their respective owners.

2

© Copyright 2013 salesforce.com, inc.

1

Application Essentials

Safe Harbor Statement Safe harbor statement under the Private Securities Litigation Reform Act of 1995: This presentation may contain forward-looking statements that involve risks, uncertainties, and assumptions. If any such uncertainties materialize or if any of the assumptions proves incorrect, the results of salesforce.com, inc. could differ materially from the results expressed or implied by the forward-looking statements we make. All statements other than statements of historical fact could be deemed forward-looking, including any projections of product or service availability, subscriber growth, earnings, revenues, or other financial items and any statements regarding strategies or plans of management for future operations, statements of belief, any statements concerning new, planned, or upgraded services or technology developments and customer contracts or use of our services.

O N

LY

The risks and uncertainties referred to above include – but are not limited to – risks associated with developing and delivering new functionality for our service, new products and services, our new business model, our past operating losses, possible fluctuations in our operating results and rate of growth, interruptions or delays in our Web hosting, breach of our security measures, the outcome of any litigation, risks associated with completed and any possible mergers and acquisitions, the immature market in which we operate, our relatively limited operating history, our ability to expand, retain, and motivate our employees and manage our growth, new releases of our service and successful customer deployment, our limited history reselling non-salesforce.com products, and utilization and selling to larger enterprise customers. Further information on potential factors that could affect the financial results of salesforce.com, inc. is included in our annual report on Form 10-K for the most recent fiscal year and in our quarterly report on Form 10-Q for the most recent fiscal quarter. These documents and others containing important disclosures are available on the SEC Filings section of the Investor Information section of our Web site.

3

N

AL

U

SE

Any unreleased services or features referenced in this or other presentations, press releases or public statements are not currently available and may not be delivered on time or at all. Customers who purchase our services should make the purchase decisions based upon features that are currently available. Salesforce.com, inc. assumes no obligation and does not intend to update these forward-looking statements.

TE R

Objectives

By the end of this course, you will be able to:

 Build and customize multi-user Force.com applications.

IN

 Create custom objects.  Customize the user interface.  Create advanced workflows and validation rules.  Automate business processes.  Manage your data.  Develop a custom user interface using Visualforce pages.

4

© Copyright 2013 salesforce.com, inc.

2

Application Essentials

Course Agenda  Module 1: Welcome to Universal Containers  Module 2: Designing Applications on the Force.com Platform  Module 3: Building Your Data Model  Module 4: Building Your User Interface  Module 5: Introducing Business Logic  Module 6: Migrating Configuration Changes  Module 7: Accommodating Multiple Users in Your App  Module 8: Managing Your Users’ Experience  Module 9: Controlling Access to Records  Module 10: Designing Data Access Security  Module 11: Building Business Processes  Module 13: Automating Business Processes with Workflow

LY

 Module 12: Preserving Data Quality  Module 14: Automating Business Processes with Approval Processes  Module 16: Auditing Processes  Module 17: Data Management

O N

 Module 15: Increasing Data Quality using Visual Workflow

 Module 18: Enhancing the User Interface Using Visualforce

5

N

AL

U

SE

 Module 19: Additional Uses for Visualforce

IN

TE R

Module 1: Welcome to Universal Containers

6

© Copyright 2013 salesforce.com, inc.

3

Application Essentials

Welcome to Universal Containers

Universal Containers 1 Market St. San Francisco, CA 94105 United States

Cargo containers

Employees

500

Revenue

USD 60,000,000

Ownership

Private

7

N

AL

U

SE

O N

LY

+1.415.555.7901 www.universalcontainers.net

Industry

IN

TE R

Recruiting Application

8

© Copyright 2013 salesforce.com, inc.

4

Application Essentials

Who Uses the Recruiting Application? Recruiters How many positions are open by department? Mario Ruiz Recruiter

Hiring Managers

LY

Ben Stuart SW Dev Manager

What are the qualifications of all candidates that have applied for a given position?

Human Resources Managers

O N

What are the recruiting patterns of new hires?

9

N

AL

U

SE

Megan Smith VP Human Resources

IN

TE R

Recruiting App

User

Position__c

Job_Application__c

Master-Detail

Interviewer__c

Candidate__c

Master-Detail

Salary__c

Offer__c

Review__c

Master-Detail

Job_Posting__c Master-Detail

Job_Posting_Site__c 10

© Copyright 2013 salesforce.com, inc.

5

Application Essentials

11

N

AL

U

SE

O N

LY

Module 2: Designing Applications on the Force.com Platform

TE R

The Declarative Framework

IN

 A set of easy-to-use tools to customize existing applications or build applications from scratch with clicks not code  Build complete applications (data model, UI, and business logic) with no programming

12

© Copyright 2013 salesforce.com, inc.

6

Application Essentials

Module Objectives By the end of this module, you will be able to:  List components of an application.

13

N

AL

U

SE

O N

LY

 List the building blocks of an application provided by the Force.com platform.

TE R

Application Design Questions  Who are your stakeholders and business partners?

 What are the business requirements?

IN

 Who will use the application?  What do you want to be able to report on?  How will people learn to use the application?

14

© Copyright 2013 salesforce.com, inc.

7

Application Essentials

Other Application Design Considerations  Apply a tiered model – User interface – Business logic – Data  Validate your design with a user group

SE

O N

LY

 Keep it simple

N

AL

U

15

TE R

Application Building Blocks User Interface

Visualforce Pages Web Controls Sites

Workflow Validation Rules Approval Processes

Business Logic

Visualforce Page Controllers Apex Code SOAP API

IN

Applications Tabs Page Layouts Record Types

Objects Fields Relationships

Data Model

SOAP API Metadata API

Declarative

Programmatic

Simplicity + Speed

Control + Flexibility 16

© Copyright 2013 salesforce.com, inc.

8

Application Essentials

Module Review 1. What are the three layers of an application?

17

TE R

N

AL

U

SE

O N

LY

2. What are the application building blocks provided by the Force.com platform?

IN

Module 3: Building Your Data Model

18

© Copyright 2013 salesforce.com, inc.

9

Application Essentials

Application Building Blocks Applications Tabs Page Layouts Record Types

User Interface

Visualforce Pages Web Controls Sites

Workflow Validation Rules Approval Processes

Business Logic

Visualforce Page Controllers Apex Code SOAP API

Objects Fields Relationships

SOAP API Metadata API

O N

LY

Data Model

Programmatic

Declarative

Control + Flexibility 19

N

AL

U

SE

Simplicity + Speed

TE R

Module Objectives By the end of this module, you will be able to:

 Create custom objects.

IN

 Create custom fields.  Create master-detail relationships.  Create lookup relationships.  Create many-to-many relationships.  Create lookup filters.  View your schema graphically.

20

© Copyright 2013 salesforce.com, inc.

10

Application Essentials

Module Agenda  Custom Objects  Custom Fields  Object Relationships

21

TE R

Objects

N

AL

U

SE

O N

LY

 Schema Builder

 Analogous to database tables

– Standard objects: pre-defined CRM-oriented

IN

– Custom objects: developer-defined  Configurable  Relational  Reportable  Searchable  Securable

22

© Copyright 2013 salesforce.com, inc.

11

Application Essentials

Fields  Analogous to database columns – Standard fields: system generated upon object creation – Custom fields: developer-defined

Name

Owner

Created Date

Last Modified by

Last Modified Date

Custom 1

Custom 2

Custom 3…

23

N

AL

U

SE

O N

LY

ID

Created By

TE R

Standard Fields: ID

 A key which uniquely locates each record

 System assigned, not updatable

IN

 Indexed

 First 3 digits identify the object type

24

© Copyright 2013 salesforce.com, inc.

12

Application Essentials

Standard Fields: Name  A short description to identify a record’s contents  Indexed  Required  Data type options: – Text : user assigned, not necessarily unique, modifiable

O N

LY

– Auto-number: system generated, (usually) unique, not modifiable

25

N

AL

U

SE

Auto-number fields can be reset by modifying the object definition. This can lead to non-unique numbering.

TE R

Standard Fields: Name (cont.)

IN

 Label of the name field defined by developer

 By default, the Name field appears as the first column in list views and related lists.

26

© Copyright 2013 salesforce.com, inc.

13

Application Essentials

Standard Fields: Owner  A reference to a user or group of users (queue)  The owner is granted additional privileges

27

N

AL

U

SE

O N

LY

 Upon creation defaults to record creator, but can be changed

TE R

Standard Fields: Created/Last Modified… System assigned, but can be initialized during record creation

 Created By: a reference to the user who created the record

IN

 Last Modified By: a reference to the user who last modified the record  Created Date: the date/time that the record was created  Last Modified Date: the date/time that the record was last modified

28

© Copyright 2013 salesforce.com, inc.

14

Application Essentials

3-1: Create Custom Objects 5 min

Goal:

Your Turn

Create a custom object called Position. Scenario: Universal Containers (UC) is currently using a spreadsheet to track new positions. This is a very inefficient process that is difficult to manage.

Task:

29

N

AL

U

SE

Create a custom Position object.

O N

LY

In order to improve this process and make it more efficient, UC has decided to create a custom object to track positions. All internal communication and activity relating to Positions should be tracked on this object. In addition, users should be able to run reports on these objects.

TE R

Module Agenda  Custom Objects

 Custom Fields

IN

 Object Relationships  Schema Builder

30

© Copyright 2013 salesforce.com, inc.

15

Application Essentials

Custom Fields  The limit on the number of custom fields per object varies with your Salesforce edition.  Deleted fields and their data are stored until permanently deleted or 15 days has elapsed, whichever happens first. – Recovering the field definition will also recover the old field data.

 Custom fields support a number of data types. Name

Owner

Custom1

Custom2

Custom3



31

TE R

Data Types

N

AL

U

SE

O N

LY

Id

Calendar Data Types

 Number

 Date

 Currency

 Date/Time

IN

Numeric Field Data Types

 Percent

Limited Option Data Types

Formatted Text Data Types

 Checkbox

 Email

 Picklist

 Phone

 Picklist (Multi-Select)

 URL

32

© Copyright 2013 salesforce.com, inc.

16

Application Essentials

Data Types (cont.) Text Data Types

Calculation Data Types

 Text

 Auto-Number

E=mc2

– Select the display format

 Text Area

– Increment by 1

 Text Area (Long)

 Formula

 Text Area (Rich)

– Perform calculations on a record

 Encrypted

– Can span across objects  Roll-Up Summary

LY

– Created on a master

33

N

AL

U

SE

O N

– Allow calculations on details

TE R

Field Dependencies

IN

A field dependency is set up between a controlling picklist or checkbox and a dependent picklist. The values in the dependent picklist will vary based on the value of the controlling field.

Standard picklist fields cannot be dependent. 34

© Copyright 2013 salesforce.com, inc.

17

Application Essentials

Custom Field Types Picklist with Field Dependency Picklist

Text

Picklist

LY

Date

35

N

AL

U

SE

TextArea

O N

Date/Time

TE R

Custom Field Properties  Label: the label of the field as displayed in the user interface

– Multi-lingual support

IN

 Name: the programmatic name used in Web Service API, formulas, etc. – Disallows spaces and certain special characters – “__c” always automatically appended to end department__c  Required: always require a value in this field in order to save a record to the database – Enforced for records entered both through the UI and the API

36

© Copyright 2013 salesforce.com, inc.

18

Application Essentials

Custom Field Properties (cont.)  Unique: disallows duplicate values – Can select whether you want uniqueness to be enforced as case sensitive or case insensitive  External ID: denotes a field that stores a key from an external system  Default Value: a formula to generate a pre-populated field value

37

N

AL

U

SE

O N

LY

 Help Text: provides a mouse-over text box to provide clarification to users

20 min

Goal:

Add custom fields to the Position and Candidate custom objects.

IN

Your Turn

TE R

3-2: Create Custom Fields

Scenario: With a new custom object created, Universal Containers has to create the fields it wants to use to track data regarding positions. There are a variety of different data types that will be required and certain fields will be dependent on others. You can use custom fields to set this up. Tasks: 1. Add custom fields to the Position and Candidate objects. 2. Create dependent picklists. 3. Add a field for the Social Security Number on the Candidate object. 38

© Copyright 2013 salesforce.com, inc.

19

Application Essentials

Module Agenda  Custom Objects  Custom Fields  Object Relationships

SE

O N

LY

 Schema Builder

N

AL

U

39

TE R

Object Relationships

Position

 Parent-to-children

 One-to-many

IN

 Relationship is defined on the child record via a field – Master-Detail Relationship

Position Position Job Application

– Lookup Relationship  Links are by record IDs Position__c

Job_Application__c

Id

Name

Id

Name

Position__c

a05S0000000WZeY

Programmer

a023000000AVJoy

APP-0069

a05S0000000WZeY

a05300000050Krc

Account Executive

a02S0000000gHgt

APP-0070

a05S0000000X2eY

Billing Assistant

a02S0000001mcpt

APP-0071

a05S0000000WZeY

a05300000050KrT

Product Manager

a023000000AVJom

APP-0072

a05300000050Krc 40

© Copyright 2013 salesforce.com, inc.

20

Application Essentials

Lookup Relationships  Independent ownership & sharing

Position

 Maximum 25 lookup relationships per child

Lookup

OR

– parent specified in lookup field cannot be deleted

SE

– Specify 1 of 3 delete behaviors

 Lookup field value on child is required

O N

 Lookup field value on child is optional

LY

Job Application

N

AL

U

41

TE R

Master-Detail Relationships  Tightly coupled

Job Application

IN

– Lookup field value on child is always required – Cascade delete

Master-Detail

– Inherited ownership & sharing  Maximum 2 master relationships per detail object

Review Job Application

42

© Copyright 2013 salesforce.com, inc.

21

Application Essentials

Let’s Compare… Lookup and Master-Detail Relationships Master-Detail Relationships

Up to 25 allowed per object.

Up to 2 allowed per object.

Parent field on child can be required or optional.

Parent field on child is required.

No impact on security and access.

Access to parent determines access to children.

If parent field is required, you cannot delete parent when referenced by child. If parent field is optional, choose one of three delete behaviors.

Deleting parent automatically deletes children.

No limit to number of layers.

Limited number of layers.

Lookup field is on page layout depends on required/optional choice.

Lookup field on page layout is required.

Roll-up summary fields not allowed.

Roll-up summary fields allowed.

43

N

AL

U

SE

O N

LY

Lookup Relationships

TE R

What Will the User See?

IN

Both relationship types look almost the same on a page layout: both include a lookup field for the one side and a related list for the many side.

44

© Copyright 2013 salesforce.com, inc.

22

Application Essentials

Reporting Implications  Reports can only display one child object type at a time  Visibility is determined by the primary object

45

N

AL

U

SE

O N

LY

– Example: My Positions, My Team’s Positions, All Positions

5 min

Goal:

Create lookup relationships to connect objects to one another.

IN

Your Turn

TE R

3-3: Create Lookup Relationships

Scenario: Universal Containers needs to be able to see which Job Applications are related to each Position. Additionally, the company needs to see which Hiring Managers are related to each Position. Tasks: 1. Create a lookup relationship between Job Application and Position. 2. Create a lookup relationship between Position and Hiring Manager.

46

© Copyright 2013 salesforce.com, inc.

23

Application Essentials

3-4: Create Master-Detail Relationships 5 min

Goal:

Your Turn

Create master-detail relationships between two objects. Scenario: At Universal Containers (UC), every position should have one or more interviewers associated with it. An Interviewer record should always be associated with a Position record. If a given position is deleted, then the associated interviewer data should also be deleted. To satisfy these requirements, UC needs to create a master-detail relationship between the Interviewer object and the Position object.

LY

In addition, job application records and review records should have a similar relationship. Tasks:

O N

1. Create a master-detail relationship between Interviewer and Position.

47

N

AL

U

SE

2. Create a master-detail relationship between Job Application and Review.

TE R

Self Relationships

 A self relationship is a lookup relationship to the same object.

IN

– Example: it is possible to create a lookup relationship from Position to Position.

 The User object has a special type of lookup relationship: the hierarchy relationship. For example, a hierarchy relationship allows developers to create a Manager field on the User object to relate another user.

48

© Copyright 2013 salesforce.com, inc.

24

Application Essentials

Many-to-Many Relationships Allow for the relationship of two objects in a many-to-many fashion.  Candidates may apply for many positions by submitting a job application for each position.  A position may have many candidates apply.

49

N

AL

U

SE

O N

LY

 Implementing a many-to-many relationship requires a third junction object.

TE R

Junction Objects

 When modeling a many-to-many relationship, you use a junction object to connect the two objects you want to relate to each other.

IN

 A junction object is a custom object with two relationships.  When creating a junction object, consider the following: – Name the object with a label that indicates its purpose. – Use the auto-number data type.

50

© Copyright 2013 salesforce.com, inc.

25

Application Essentials

Recruiting Application Object Model User

Position__c

Job_Application__c

Master-Detail

Interviewer__c

Candidate__c

Master-Detail

Offer__c

Salary__c

Review__c

LY

Master-Detail

Master-Detail

51

N

AL

U

SE

Job_Posting_Site__c

O N

Job_Posting__c

5 min

Goal:

Create a Many-to-Many Relationship between Position and Job Posting Site.

IN

Your Turn

TE R

3-5: Create a Custom Junction Object

Scenario: Universal Containers will have many positions advertised on various job posting sites. The company wants to be able to connect and manage those records within Salesforce. Tasks: 1. Create a new custom junction object. 2. Create the master-detail relationships of Job Posting with Position and Job Posting Site.

52

© Copyright 2013 salesforce.com, inc.

26

Application Essentials

O N

Limit search results for users Create on lookup, master-detail and hierarchical fields Compare fields to static values or to other fields Can be required Define informational messages

53

N

AL

U

SE

    

LY

Lookup Filters

5 min

Goal:

Create a lookup filter.

IN

Your Turn

TE R

3-6: Create a Lookup Filter

Scenario: At Universal Containers (UC), only users who are people managers should be selected as the hiring manager on a new position. UC needs to create a lookup filter that would prevent users from selecting a user who is not a hiring manager when creating a new position. Tasks: Create a lookup filter.

54

© Copyright 2013 salesforce.com, inc.

27

Application Essentials

Module Agenda  Custom Objects  Custom Fields  Object Relationships

55

N

AL

U

SE

O N

LY

 Schema Builder

TE R

Schema Builder

IN

The schema builder is a graphical tool to create and modify custom: • Objects. • Fields. • Relationships.

56

© Copyright 2013 salesforce.com, inc.

28

Application Essentials

Schema Builder (cont.)

View relationships.

57

N

AL

U

SE

O N

Double click on custom fields to edit them.

LY

Drag elements to the canvas to create objects or fields.

TE R

Module Review

1. What is a custom object?

2. List examples of custom field types.

IN

3. True or False: If a field is set to “required,” users will be required to populate it when loading data through the API. 4. List the four types of custom relationships that can be built on the Force.com platform and describe the differences among them.

58

© Copyright 2013 salesforce.com, inc.

29

Application Essentials

SE

O N

LY

Module 4: Building Your User Interface

N

AL

U

59

TE R

Application Building Blocks User Interface

Visualforce Pages Web Controls Sites

Workflow Validation Rules Approval Processes

Business Logic

Visualforce Page Controllers Apex Code SOAP API

IN

Applications Tabs Page Layouts Record Types

Objects Fields Relationships

Data Model

SOAP API Metadata API

Declarative

Programmatic

Simplicity + Speed

Control + Flexibility 60

© Copyright 2013 salesforce.com, inc.

30

Application Essentials

Module Objectives By the end of this module, you will be able to:  Create a custom application with a custom logo.  Create a custom object tab.  Modify a page layout.  List the customizations possible on a page layout.  List customizations that are not permitted on a page layout.

LY

 Describe the limitations of field attributes set exclusively on the page layout.

61

N

AL

U

SE

O N

 Set a default landing page for a custom application.

TE R

Module Agenda

 Custom Applications and Custom Tabs

IN

 Custom Page Layouts

62

© Copyright 2013 salesforce.com, inc.

31

Application Essentials

Custom Apps  An application is a logical container for all of the objects, tabs, processes, and services associated with a given business function.  A Force.com custom app consists of a name, a description, an ordered list of tabs, and, optionally, a custom logo and a landing page.

63

N

AL

U

SE

O N

LY

 Salesforce provides standard apps such as Sales and Call Center.

TE R

Custom Apps (cont.)  Custom app logos

IN

– For custom logos, any GIF or JPG file from the Documents tab can be inserted if it is under 20kb in size.  Specify a custom default landing tab when creating or editing a custom app. – Use the Default Landing Tab drop-down menu below the tab selection area of the app creation wizard.

64

© Copyright 2013 salesforce.com, inc.

32

Application Essentials

4-1: Create a Custom Application 5 min

Goal:

Your Turn

Create a custom Recruiting Application. Scenario: Now that Universal Containers has created several new objects and populated them with fields, the company needs to store them in one logical, easy to access location. Tasks:

65

TE R

Custom Tabs

N

AL

U

SE

O N

LY

Create a custom Recruiting Application.

 A custom tab is a user interface component you create to display custom object data or other web content embedded in the application.

IN

 There are three types of custom tabs. – Custom Object Tabs: Display the data of your custom object in a user interface tab – Web Tabs: Display any external web-based application or web page in a user interface tab (more on this later) – Visualforce Tabs: Display a Visualforce page in a user interface tab  Custom tabs will have a Tab Style (color scheme and icon).

66

© Copyright 2013 salesforce.com, inc.

33

Application Essentials

4-2: Create Custom Tabs 5 min

Goal:

Your Turn

Create custom tabs for the Position and Job Posting objects. Scenario: Universal Containers wants to make sure that users will be able to easily access the new custom objects it has created. The company needs to create new custom tabs that will quickly guide people to this information. Tasks:

LY

1. Create a custom tab for the Positions object.

2. Create a custom tab for the Job Postings object.

67

N

AL

U

SE

O N

3. Reorder the tabs for your user account.

TE R

Module Agenda

 Custom Applications and Custom Tabs

IN

 Custom Page Layouts

68

© Copyright 2013 salesforce.com, inc.

34

Application Essentials

Page Layouts  Page Layout defines the organization of: – Fields – Custom links – Related lists on an object detail page

O N

LY

 Page Layout customizations include: – Field locations – Page section customizations – Field properties (visible, read-only and required)

69

N

AL

U

SE

Establish unique layouts for different business scenarios. Use Visualforce pages to customize beyond the Salesforce look and feel.

TE R

Enhanced Page Layout Editor Switch to other layouts

IN

Video tutorial

Copy layouts faster with Save As

Drag and drop page elements to add them to the layout Add blank spaces to align fields, or add impact

Manage standard and custom buttons

70

© Copyright 2013 salesforce.com, inc.

35

Application Essentials

4-3: Customize Page Layouts 10 min

Goal:

Your Turn

Create a page layout for the Position object. Scenario: Universal Containers wants to make sure that the newly created fields are displayed in a logical order on the page. The fields should be arranged according to the chart and instructions below. Tasks: 1. Arrange existing fields in the Position Page Layout.

LY

2. Create a new section and add fields for Description on the Position Page Layout.

O N

3. Create a new section and add fields for Compensation on the Position Page Layout.

71

N

AL

U

SE

4. Set the Status field to be required and add Position History to the Related Lists area.

TE R

Module Review

1. List things that can be customized on a page layout.

IN

2. If a field is made read-only on a page layout, what happens if a user attempts to edit that field through the SOAP API?? 3. List the three types of custom tabs. 4. Which component discussed in this section limits the records displayed when selecting a related parent record? 5. Which component controls which columns are displayed in a related list? 6. True or false?: An application references related objects, business logic components, and tabs.

72

© Copyright 2013 salesforce.com, inc.

36

Application Essentials

SE

O N

LY

Module 5: Introducing Business Logic

N

AL

U

73

TE R

Application Building Blocks User Interface

Visualforce Pages Web Controls Sites

Workflow Validation Rules Approval Processes

Business Logic

Visualforce Page Controllers Apex Code SOAP API

IN

Applications Tabs Page Layouts Record Types

Objects Fields Relationships

Data Model

SOAP API Metadata API

Declarative

Programmatic

Simplicity + Speed

Control + Flexibility 74

© Copyright 2013 salesforce.com, inc.

37

Application Essentials

Module Objectives By the end of this module, you will be able to:  Create a custom formula operating on fields from one object.  Create a cross-object formula.

75

N

AL

U

SE

O N

LY

 Create a roll-up summary field.

TE R

Module Agenda  Formula Fields

IN

 Roll-Up Summary Fields

76

© Copyright 2013 salesforce.com, inc.

38

Application Essentials

Custom Formula Fields  “Smart” custom fields that can be used to build business-specific calculations using simple wizards and an Excel-like formula language  Can reference standard, custom, or other formula fields

77

N

AL

U

SE

O N

LY

 Can reference fields on related objects

IN

TE R

Steps to Write a Formula

Step 1: Describe the business requirements.

Step 2: Create simple statements.

Step 3: Write the formula.

78

© Copyright 2013 salesforce.com, inc.

39

Application Essentials

Steps to Write a Formula (cont.) Business case: Recruiting managers have committed to working on each new position within 48 hours of when it’s created. Recruiting managers need an easy way to monitor the number of hours since each open position was created.

Simple Statements: Return the number of hours it has been open

Otherwise: Formula Usage:

Return null

O N

IF(logical_test, value_if_true, value_if_false)

LY

If the Position Status is created:

Formula Example:

79

N

AL

U

SE

IF(ISPICKVAL(Status__c, "Open"), 24 * (NOW() - CreatedDate ), null)

10 min

Goals:

Create a Review formula field to calculate overall score Create a Position formula that tracks the number of days a position had been opened.

IN

Your Turn

TE R

5-1: Create Formula Fields

Scenario: The VP of HR at Universal Containers is interested in tracking the overall score of each candidate who has been interviewed, as well as the number of days that a position stays open. You need to create formula fields to accomplish these tasks. Tasks: 1.

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

2.

Create new records to test your formula.

3.

Create a new custom formula field that calculates the Days Opened on the Position object. 80

© Copyright 2013 salesforce.com, inc.

40

Application Essentials

Cross-Object Formulas  Enable you to incorporate merge fields from multiple objects for calculations and display  Create formulas that reference fields on parent or grandparent object (up to 10 levels)  Are limited to ten unique relationships per object across all formulas and rules for that object  Display fields from related objects on detail pages, list views, reports, etc.

81

N

AL

U

SE

O N

LY

 Use a simple wizard to browse across objects and insert fields in formulas

5 min

Goal:

Use cross-object formula fields to make fields from related objects visible on an object.

IN

Your Turn

TE R

5-2: Create Cross-Object Formulas

Scenario: Universal Containers users would like to see the candidate full name and position title on an offer. Tasks: 1. Create a formula field to pull the candidate full name to display on the offer. 2. Create a formula field to pull the position title to display on the offer.

82

© Copyright 2013 salesforce.com, inc.

41

Application Essentials

Module Agenda  Formula Fields

83

N

AL

U

SE

O N

LY

 Roll-Up Summary Fields

TE R

Roll-Up Summary Fields  Roll-up summary fields are read-only formula fields that can display the sum, min, or max value or record count of a field in a related list.

IN

– For all custom master-detail relationships – For limited standard relationships (Account-Opportunity and Opportunity-Product)  There is an option to include all records in the roll-up or just records that meet certain criteria.

84

© Copyright 2013 salesforce.com, inc.

42

Application Essentials

5-3: Create Roll-Up Summary Fields 10 min

Goal:

Your Turn

Calculate the average of all review scores on a job application. Scenario: To ensure the company hires stand-out candidates, the HR Director of Universal Containers wants to see a list of the all of the combined review scores on each Job Application. Tasks:

LY

1. Create a roll-up summary field for Total Reviews on the Job Application object.

O N

2. Create a roll-up summary field for Review Scores on the Job Application object.

85

N

AL

U

SE

3. Create a formula field that calculates the Average Review Score for a job application.

TE R

Module Review

1. Give an example of cross-object formula that we created during this section.

IN

2. What are the ways to make a field required?

86

© Copyright 2013 salesforce.com, inc.

43

Application Essentials

87

N

AL

U

SE

O N

LY

Module 6: Migrating Configuration Changes

TE R

Module Objectives By the end of this module, you will be able to:

 Describe when change sets can be used.

IN

 Describe considerations of change set usage.

88

© Copyright 2013 salesforce.com, inc.

44

Application Essentials

Migrating Configuration Changes  Configuration definitions are stored as metadata  As organizations make changes to one environment, those changes often need to be carried over to another environment – For example, from a Development Sandbox to a Training Sandbox or a Training Sandbox to a Production environment

 There are a few automated ways to move metadata: – Force.com IDE – Force.com migration tool (Ant-based)

LY

– Change Sets  Sandbox retention policy:

O N

– Sandboxes that no one has logged into for 180 days will be deleted

89

IN

TE R

Change Sets

N

AL

U

SE

– Sandboxes that have been locked for 60 days will be deleted

metadata

metadata

Development Sandbox

Production Testing Sandbox

 Move configuration changes (metadata) between related organizations using a point-and-click interface.  Move metadata, not data.

90

© Copyright 2013 salesforce.com, inc.

45

Application Essentials

Additional Information about Change Sets

Inbound

Outbound

upload Development Sandbox

Testing Sandbox

LY

 Apex code must meet unit test requirements.

 The system will detect any incompatibilities between versions.

O N

 Manually migrate components and changes that can’t be included.  Once uploaded, a change set cannot be modified.

91

N

AL

U

SE

 A change set is deployed in its entirety, or not at all.

TE R

Module Review

1. What happens if one element of a change set fails to deploy?

IN

2. True or False: Change sets can be used to move data and metadata from one organization to another.

92

© Copyright 2013 salesforce.com, inc.

46

Application Essentials

93

N

AL

U

SE

O N

LY

Module 7: Accommodating Multiple Users in Your App

TE R

Module Objectives By the end of this module, you will be able to:

IN

 List things to consider when designing an application for multiple users.  List the primary actors in the Recruiting Application.

94

© Copyright 2013 salesforce.com, inc.

47

Application Essentials

Things to Consider When Designing an App  Consider the actors—who will be using the app?  What will these users expect to see and do?  What data is most important?  What should these users be able to see—are there any data restrictions?  Are there any auditing requirements?  How can we make the user experience efficient?

LY

 Which users should be able to customize the app?

95

N

AL

U

SE

O N

 Who will administer the app?

IN

TE R

Universal Containers Scenario

Positions

Candidates/Job Apps

Reviews

R, C, E

R, C, E

R, C, E

R, C, E*

R*

R

R*

Recruiter

R**, C**, E**

Hiring Mgr

R**, C**, E**

Interviewer Legend: R=Read, C=Create, E=Edit * = where shared **= where shared through parent 96

© Copyright 2013 salesforce.com, inc.

48

Application Essentials

Module Review 1. What things should you consider before building an application? 2. Who are the actors in the recruiting application?

97

TE R

N

AL

U

SE

O N

LY

3. What are the objects that we’ll need to track?

IN

Module 8: Managing Your Users’ Experience

98

© Copyright 2013 salesforce.com, inc.

49

Application Essentials

Module Objectives By the end of this module, you will be able to:  List the different types and characteristics of licenses the Force.com platform supports.  List the things a profile controls in the application.  List the aspects of the profile that control access to data.  Create a profile.  Describe how to use permission sets with profiles.

LY

 Create a record type and page layout to alter the user experience.

99

N

AL

U

SE

O N

 Employ field-level security to lock down access to field data.

TE R

Module Agenda  Licenses

 User Profiles and Permissions

IN

 Access to Data  Record Types and the User Interface

100

© Copyright 2013 salesforce.com, inc.

50

Application Essentials

License Types  Each user must have a user license.  Different types of user licenses allow different levels of access.

101

N

AL

U

SE

O N

LY

 Feature licenses determine whether users have access to additional features.

TE R

Module Agenda  Licenses

 User Profiles and Permissions

IN

 Access to Data  Record Types and the User Interface

102

© Copyright 2013 salesforce.com, inc.

51

Application Essentials

What is a Profile?  Defines a user’s ability to perform different functions, see records, and how the records are displayed.  Profiles work in conjunction with your organization’s sharing model or role hierarchy.  Every user is assigned to a profile (ONLY 1 profile). Access to Data

User Interface

App Permissions

Field Level Security

Page Layouts

System Permissions

Login Hours and IP Ranges

Record Types

Standard/Custom Object CRED

LY

Permissions

Tabs

103

N

AL

U

SE

O N

Applications

TE R

Additional Information About Profiles  Standard profiles are available:

– Permissions on standard profiles cannot be customized.

IN

– Custom profiles can be created based on standard profiles.  Developers can create custom profiles.  Each profile is associated with a license type.

104

© Copyright 2013 salesforce.com, inc.

52

Application Essentials

What Do Profiles Control?  Tabs users see.

105

N

AL

U

SE

O N

LY

 What users can do to records they can access.

TE R

What Do Profiles Control? (cont.) • Login hours and login IP ranges:

IN

– Sets the hours when users with a particular profile can use the system.

– Sets the IP addresses from which users with a particular profile can log in.

106

© Copyright 2013 salesforce.com, inc.

53

Application Essentials

What Do Profiles Control? (cont.)  Profiles control System Permissions.

107

N

AL

U

SE

O N

LY

 Profiles control App Permissions.

TE R

A Few Permissions to Note  View All Data, Modify All Data, and Customize Application permissions allow System Administrators see and edit every record.

IN

 A user with the API Only User permission can not login from www.salesforce.com.  Password Never Expires permission is often used for integration users.

108

© Copyright 2013 salesforce.com, inc.

54

Application Essentials

8-1: Create Custom Profiles 15 min

Goal: Create a new profile for recruiters. Scenario: At Universal Containers (UC), recruiters need to be able to create, view, and modify any position, candidate, job application, or review. To comply with state and federal laws, all recruitment-related info must be saved for several years. Consequently, recruiters should NOT have the ability to delete records. Other users only need view access on certain objects. Tasks: 1. Enable the Enhanced Profile User Interface 2. Create a custom recruiter profile 3. Define the recruiter profile to accomplish the business requirements 4. Assign users to this new profile. 109

N

AL

U

SE

O N

LY

Your Turn

TE R

What are Permission Sets?  Users have one profile.

IN

 Users can have multiple permission sets.

Profile

Permission Set 1

Permission Set 2

Permission sets are groups of permissions that can be assigned to specific users in addition to their existing profile permissions.

© Copyright 2013 salesforce.com, inc.

55

110

Application Essentials

How do Permission Sets Work with Profiles? • Grant additional permissions beyond the user’s profile. • Never deny permissions. Profile

Permission Set 1

+

User Access

=

O N

LY

+

Permission Set 2

111

N

AL

U

SE

You organization can have up to 1,000 permission sets.

TE R

How to Use Permission Sets with Profiles  Use profiles to assign the most restrictive permissions and access settings.

Consider using permission sets to:

 Use permission sets to grant additional permissions.

 Allow a subset of users to perform a certain set of tasks, such as deleting or transferring records.

IN

 Represent a concept, like a user’s job title.

If you are using one-off profiles, consider using permission sets instead. 112

© Copyright 2013 salesforce.com, inc.

56

Application Essentials

Which Permissions can be Set using Permission Sets?  Use permission sets to specify permissions for: – Applications – Objects – Tabs – Fields – Record Type – Service provider – Apex classes

LY

– Visualforce pages

113

N

AL

U

SE

O N

Permissions not available in permission sets must be set through Profiles.

10 min

Goal:

Create permission sets for the hiring manager and interviewers.

IN

Your Turn

TE R

8-2: Create Permission Sets

Scenario: Hiring managers and interviewers have different needs and different levels of access to the information that will be stored in the Recruiting Application. In addition, the access of hiring managers and interviewers to other portions of the organization needs to be maintained. Tasks: 1. Create a new permission set for hiring managers.

2. Create a new permission set for interviewers. 3. Assign users to the new permission sets.

114

© Copyright 2013 salesforce.com, inc.

57

Application Essentials

Module Agenda  Licenses  User Profiles and Permissions  Access to Data

115

N

AL

U

SE

O N

LY

 Record Types and the User Interface

TE R

What is Field-Level Security? Restricts users’ access to view and edit fields.

IN

Overrides any less-restrictive field access settings in page layouts and search layouts. Controls which fields users can access in related lists, list views, reports, Force.com Connect Offline, email and mail merge templates, custom links, and when synchronizing data or importing personal data.

116

© Copyright 2013 salesforce.com, inc.

58

Application Essentials

8-3: Change Access Using Field-Level Security 5 min

Your Turn

Goal: Use field-level security to remove access to Social Security Numbers on candidate records. Scenario: In an effort to secure personal information on candidates, Universal Containers wants to ensure that recruiters cannot see or edit the Social Security Number of a candidate. Tasks:

117

N

AL

U

SE

O N

LY

Modify the field-level security for candidates to hide the Social Security Number field for recruiters.

TE R

Module Agenda  Licenses

 User Profiles and Permissions

IN

 Access to Data  Record Types and the User Interface

118

© Copyright 2013 salesforce.com, inc.

59

Application Essentials

Record Types  Record types are used to tailor user interaction experience to specific business needs.  Record types can determine page layouts. Technical Record Type

Non-technical Record Type

Hiring Manager

Page Layout A

Page Layout B

Recruiter

Page Layout C

Page Layout C

O N

LY

 Or limit picklist options.

119

N

AL

U

SE

Record types only affect the way that data is displayed in the UI. It is not a form of sub-classing.

TE R

Record Types (cont.)

Record types can be set by users.

IN

 New records: Initial step before new record edit window.

 Existing records: [Change] link next to Record Type field. The record types available in the picklist are determined by the user profile or permission set.

120

© Copyright 2013 salesforce.com, inc.

60

Application Essentials

8-4: Create Record Types 10 min

Join Me

Goal: Create a custom record type that limits the picklist choices available to hiring managers. Scenario:

Tasks:

O N

1. Create a Technical Position record type.

LY

Technical hiring managers can open new positions, but they should only open positions in IT and Engineering departments. When creating a technical position, hiring managers should have access only to the IT and Engineering values. When creating a non-technical position, hiring managers should have access to the other department values. Recruiters should be able to see and use all department values.

121

N

AL

U

SE

2. Repeat the process, creating a Non-technical Position record type.

TE R

What Does a Page Layout Control?  How detail and edit pages are organized.

IN

 Page section customizations.  Which fields, related lists, and Custom Links a user sees.  Field properties—visible, readonly and required.

May establish unique layouts for different business scenarios. 122

© Copyright 2013 salesforce.com, inc.

61

Application Essentials

8-5: Create Page Layouts 15 min

Goal:

Your Turn

Create a new page layout to reflect differences between technical and non-technical positions. Scenario: When creating new positions, technical hiring managers need to specify technical criteria desired for their candidates, such as programming language or operating system. Recruiters need to be able to create all kinds of positions. Tasks:

LY

1. Create fields for Operating Systems and Programming Languages.

123

N

AL

U

SE

O N

2. Create a new page layout for technical positions. On the new page layout, show the Operating System and Programming Language fields in a separate section.

10 min

Goal:

Create page layouts and record types for approved positions.

IN

Your Turn

TE R

8-6: Create Page Layouts and Record Types

Scenario: Universal Containers would like to implement an approval process for each position. This process will route positions to the approvers specified on the position. Once the position has been approved, the approvers no longer need to be listed on the position. Tasks: 1. Create new page layouts for approved technical positions and approved non-technical positions. 2. Create new record types for approved technical positions and approved non-technical positions. 124

© Copyright 2013 salesforce.com, inc.

62

Application Essentials

Module Review 1. What are the different types of licenses that are available? 2. What do profiles control? 3. What are the permissions that allow a System Administrator to manage the application? 4. True or False: When creating a new profile, it’s possible to copy over settings from an existing profile.

125

N

AL

U

SE

O N

LY

5. If you remove access to an app from a profile, will users in that profile still be able to see the tabs included in that application?

TE R

Module Review (cont.) 6. If you hide a tab from a profile, will users in that profile be able to see records for that object?

IN

7. If you have two record types for an object, do you need to have two page layouts for that object? 8. If a user doesn’t have access to a specific record type, will they be able to see the records that have that record type? 9. True or False: A field hidden by field-level security is still visible through the API. 10. When should you use field-level security? Record types? Page layouts?

126

© Copyright 2013 salesforce.com, inc.

63

Application Essentials

127

N

AL

U

SE

O N

LY

Module 9: Controlling Access to Records

TE R

Module Objectives By the end of this module, you will be able to:

 List the features that affect access to data at the record level.

IN

 List the organization-wide default (OWD) settings.  List and define the sharing levels.  Set organization-wide defaults.  Create a role.  Create a public group.  Create a sharing rule.  Manually share records.

128

© Copyright 2013 salesforce.com, inc.

64

Application Essentials

Module Agenda  Overview of Record Access  Record Ownership  Organization-Wide Defaults  Roles and Groups of Users

129

N

AL

U

SE

O N

LY

 Sharing

TE R

Record Access

 The sharing model determines access to specific records.

– Who has access?

IN

– What level of access? – Why they have access?  Access to records is dependent on object CRED.

130

© Copyright 2013 salesforce.com, inc.

65

Application Essentials

Levels of Record Access  Read-only privileges: – View Full Access

 Read/Write privileges: – View

Transfer Ownership

– Edit

Delete Share

 Full Access privileges:

Read/Write Edit

– View

Read Only

LY

– Edit

View

– Transfer ownership

O N

– Delete

131

N

AL

U

SE

– Share

TE R

Ways to Obtain Access to a Record Full Access:

Read/Write or Read-Only Access:

 Owner field

 Organization-wide default

– Queue member

 Above user (who has read/write or read-only access) in role hierarchy.

IN

– User

 Above user (who has ownership) in role hierarchy .

 Manually sharing

 Profile permission: “Modify All Data”

 Sharing rules

 Object permission: “Modify All”

 Apex sharing  Profile permission: “View All Data”  Object permission: “View All”

132

© Copyright 2013 salesforce.com, inc.

66

Application Essentials

Profiles and the Sharing Model Profiles

Sharing Model

 Controls access to objects (Candidates, Positions, etc.).

 Controls access to records (e.g., one candidate, Joe Schmoe, one position, Black Box Tester).

 Controls access to fields (Candidate Name, Min Pay, Skills Required, etc.).

LY

A user’s profile might specify that a user can see candidates, but the sharing model determines which candidates that user can see.

133

N

AL

U

SE

O N

The sharing model might determine that a user can see Joe Schmoe, but the profile specifies which fields that user can view and edit.

TE R

Module Agenda

 Overview of Record Access

 Record Ownership

IN

 Organization-Wide Defaults  Roles and Groups of Users  Sharing

134

© Copyright 2013 salesforce.com, inc.

67

Application Essentials

Record Ownership

 Most Records have an associated Owner. – Exception: Child records in a master-detail relationship inherit access rights from parent record.  Types of Owners:

LY

– Users

135

N

AL

U

SE

 Record owners have Full Access.

O N

– Queues

TE R

Custom Object Queues  Queues allow groups of users to manage a shared workload more effectively.

IN

 A queue is a location where records can be routed to await processing by a group member.  Records remain in the queue until a user accepts them for processing or they are transferred to another queue.  Developers can specify the set of objects that are supported by each queue, as well as the set of users that are allowed to retrieve records from the queue.  Any member of a queue has the same access to all records in the queue that an owner would have.

136

© Copyright 2013 salesforce.com, inc.

68

Application Essentials

9-1: Create Custom Object Queues 5 min

Your Turn

Goal: Create a custom queue for the Recruiting department to hold position and candidate records. Scenario: Universal Containers wants to use the queue feature to manage the pool of recruiters working with open positions and candidates. Task:

137

N

AL

U

SE

O N

LY

Create a queue for positions and candidates.

TE R

Module Agenda

 Overview of Record Access

 Record Ownership

IN

 Organization-Wide Defaults  Roles and Groups of Users  Sharing

138

© Copyright 2013 salesforce.com, inc.

69

Application Essentials

What are Organization-Wide Defaults (OWD)?  Organization-wide defaults are a security setting defining the baseline access to data records.  They can be defined for the custom as well as several standard objects.  Access levels:

– Public Read/Write—All users can see and edit every record. – Public Read-Only—All users can see every record.

139

N

AL

U

SE

O N

LY

– Private—Users can not access records.

IN

TE R

Determining How to Set OWD for an Object Questions to ask:

1. Who is the most restricted user of this object? 2. Is there ever going to be an instance of this object that this user shouldn’t be allowed to see? 3. Is there ever going to be an instance of this object that this user shouldn’t be allowed to edit?

140

© Copyright 2013 salesforce.com, inc.

70

Application Essentials

Organization-Wide Defaults Considerations  Child records in master-detail relationships inherit their organizationwide defaults from their parents.  Child records in lookup relationships have independent organizationwide defaults from their parents.

141

N

AL

U

SE

O N

LY

 Changing organization-wide defaults can produce unintended consequences; consider your business requirements carefully before setting your organization-wide defaults.

5 min

Goal:

Use organization-wide defaults (OWD) to restrict edit permissions for position data.

IN

Join Me

TE R

9-2: Set Organization-Wide Defaults

Scenario: At Universal Containers, standard users (who are not recruiters), hiring managers, or interviewers are only allowed to view position data. There will never be any position that a standard user is not permitted to see. Tasks: Change the organization-wide default setting for Positions.

142

© Copyright 2013 salesforce.com, inc.

71

Application Essentials

9-3: Set Organization-Wide Defaults 5 min

Goal:

Your Turn

Establish appropriate organization-wide defaults for Candidates, Job Applications, and Reviews. Scenario: The accessibility for Candidate, Job Application, and Review records should be as follows: • Individuals in Human Resources should be able to read, create, and edit any of Candidate, Job Application, or Review record. This includes the VP and any subordinates. • Interviewers should be permitted to see only those Candidate and Job Application records to which they’ve been assigned as interviewers. Additionally, they should only be permitted to view, create, and modify their own Review records.

LY

• Hiring managers should only be able to see a Candidate, Job Application, or Review record if it is related to a Position for which they are responsible.

O N

• Other users should not have access to Candidate, Job Application, and Review records. Tasks:

143

TE R

Review

N

AL

U

SE

Update organization-wide defaults for Candidates and Job Applications.

1. True or False: Child records in master-detail relationships have their own organization-wide defaults.

IN

2. What is the most restrictive level of access that can be set on organization-wide defaults? 3. True or False: Organization-wide defaults can be set for both standard and custom objects. 4. If even one person in your organization is not allowed to see position data, what should your OWD be?

144

© Copyright 2013 salesforce.com, inc.

72

Application Essentials

Module Agenda  Overview of Record Access  Record Ownership  Organization Wide Defaults  Roles and Groups of Users

145

N

AL

U

SE

O N

LY

 Sharing

TE R

Universal Containers Scenario

IN

Universal Containers’ role hierarchy:

146

© Copyright 2013 salesforce.com, inc.

73

Application Essentials

What are Roles and Role Hierarchy? A Role:  Controls the level of visibility that users have to an organization's data.  A user may only be associated to one role. Role Hierarchy:  Controls data visibility.  Controls record roll up for reporting.

147

N

AL

U

SE

O N

 Not necessarily the company’s organization chart.

LY

 Users usually inherit the special privileges of data owned by or shared with users below them in the hierarchy.

TE R

Role Hierarchy Considerations  With Standard Objects, access to records rolls up through the Role Hierarchy.

IN

 With Custom Objects, developers choose whether or not access should roll up through the role hierarchy. – Determined by the Grant Access Using Hierarchies setting on organization-wide defaults.

148

© Copyright 2013 salesforce.com, inc.

74

Application Essentials

Knowledge Check

149

N

AL

U

SE

O N

LY

Assuming organization-wide defaults are set to Private and Grant Access Using Hierarchies is checked: 1. What can Cynthia Capobianco see? 2. Can Andrew Goldberg see records owned by Amy Lojack? Can he edit them? 3. Can Megan Smith edit records owned by Mario Ruiz?

5 min

Goal:

Complete the role hierarchy by adding a role for product managers.

IN

Your Turn

TE R

9-4: Implement a Role Hierarchy

Scenario: Universal Containers has added a new role called Product Manager and would like the hierarchy to reflect the addition. Tasks: 1. Add a new Product Manager role. 2. Assign users to the new role. 3. Log in as a Product Manager and as the Director of Product Management to test the changes to the hierarchy.

150

© Copyright 2013 salesforce.com, inc.

75

Application Essentials

Public Groups  Public groups are a way of grouping together users for access. – Can be used in a sharing rule. – Can be used to give access to folders.

151

N

AL

U

SE

O N

LY

 Every organization has a default public group that includes all users.

TE R

Public Groups (cont.)

 Public Groups can be made up of any combination of:

– Users.

IN

– Roles.

– Roles and Subordinates. – Public Groups.  Public group membership is updated when public groups are made up of roles or roles and subordinates, or when a user is added or removed from the role.

152

© Copyright 2013 salesforce.com, inc.

76

Application Essentials

9-5: Create a Public Group 5 min

Goal:

Your Turn

Create a new public group including all interviewers. Scenario: Universal Containers would like to create a public group that includes all interviewers so that it can easily share records and documents with them. Tasks:

153

N

AL

U

SE

O N

LY

Create a public group called All Interviewers.

TE R

Module Agenda

 Overview of Record Access

 Record Ownership

IN

 Organization Wide Defaults  Roles and Groups of Users  Sharing

154

© Copyright 2013 salesforce.com, inc.

77

Application Essentials

LY

Universal Containers Scenario

 Megan Smith’s team cannot see any reviews owned by Andrew Goldberg’s team.

O N

 Ben Stuart cannot see reviews written by QA or Product Management.

155

N

AL

U

SE

 Melissa Lee cannot see records for candidates she needs to interview.

TE R

Manual Sharing

 Used to open up access to a specific record.

IN

 Granted by owners, anyone above owners in the role hierarchy, and System Administrators.

156

© Copyright 2013 salesforce.com, inc.

78

Application Essentials

9-6: Implement Manual Sharing 5 min

Your Turn

Goal: Add manual sharing for various users to grant access on records where they are invested in the information. Scenario: Establish manual sharing at Universal Containers to accomplish the remaining access levels: • Grant hiring managers read and update access on positions and candidates where they are the hiring manager.

LY

• Grant interviewers read access on job application and candidate records for people they are interviewing.

O N

Tasks:

157

TE R

Sharing Rules

N

AL

U

SE

Establish manual sharing for an existing position.

 Can be based on the owner of a record or criteria on that record.

IN

 Create exceptions to organization-wide defaults for particular groups of users.  Are used to open up access to records.  Cannot be more strict than organization-wide default settings.  Access granted through a sharing rule rolls up through the hierarchy.

158

© Copyright 2013 salesforce.com, inc.

79

Application Essentials

9-7: Implement Sharing Rules 10 min

Your Turn

Goal: Allow recruiters, recruiting managers, and the VP of Human Resources to view all elements of the recruiting process. Scenario: Recruiters and their management should be able to read and update every position, candidate, job application, and review record in the application. Tasks:

159

N

AL

U

SE

O N

LY

Create sharing rules to give recruiters the access they need to positions, candidates, job applications, and reviews.

TE R

Apex Sharing Reasons

IN

 Clicking the Sharing button on a record displays the various reasons that a user might have access to a record. Examples of sharing reasons include: – Administrator – Owner

– Custom Object Sharing Rule  Establishing Apex sharing reasons allows developers to define the reason that a user or group of users might have access to a record.

160

© Copyright 2013 salesforce.com, inc.

80

Application Essentials

Apex Sharing Reasons (cont.)  The Apex sharing reasons describe why users can access a record. Examples might be: – Open Position (users have access to a position record because that position is currently open). – Hiring Manager (users might have access to a position because they are the hiring manager on that position).  Apex sharing reasons are defined for custom objects only.  Apex sharing reasons are defined object by object.

161

N

AL

U

SE

O N

LY

– So, positions might have different reasons than candidates.

5 min

Goal:

Define the reasons that a record may be shared.

IN

Join Me

TE R

9-8: Create Apex Sharing Reasons

Scenario: Universal Containers wants to add new Apex sharing reasons to show the reasons why a record may be shared. Tasks: 1. Create new Apex sharing reasons. 2. Add sharing on a position record to see the new sharing reasons.

162

© Copyright 2013 salesforce.com, inc.

81

Application Essentials

Sharing Records Simple

Manual Sharing

LY

Sharing Rules

Flexible

163

N

AL

U

SE

Apex Sharing

O N

Automated

TE R

Controlling Data

 Permissions

– View All Data

IN

 Record Ownership  Organization-Wide Defaults – Read-Only – Read/Write  Roles – Above the owner?  Sharing

– Sharing Rules – Manual Sharing

164

© Copyright 2013 salesforce.com, inc.

82

Application Essentials

Controlling Data Review Apex Sharing Sharing Rules Owner (User or Queue) Modify or View All Data Permission Organization Wide Defaults

O N 165

N

AL

U

SE

Manual Sharing

LY

Role Hierarchy

TE R

Module Review

1. List all of the reasons that a user might be able to see a particular record.

IN

2. What is the difference between a role and a profile? 3. True or False: Sharing rules are used to restrict access to records. 4. If a developer wanted to set up his organization so that managers always see records owned by their subordinates, what feature should the developer use? 5. If a user needed to give access to just one record, what feature should that user choose?

166

© Copyright 2013 salesforce.com, inc.

83

Application Essentials

167

N

AL

U

SE

O N

LY

Module 10: Designing Data Access Security

TE R

Module Objectives By the end of this module, you will be able to:

IN

 Apply profiles, organization-wide defaults, role hierarchy, and sharing to govern access to data.  Apply organization-wide defaults, public groups, and manual sharing to create conditional access to data.  Analyze suitability of field-level security, page layouts, and record types to satisfy business requirements.

168

© Copyright 2013 salesforce.com, inc.

84

Application Essentials

Module Agenda  Limiting Data Access

169

N

AL

U

SE

O N

LY

 Which Tool to Use?

20 min

Goal: Create a process by which position access is determined by the status of a position. Scenario:

IN

Your Turn

TE R

10-1: Establish Data Access

Universal Containers has determined that new and open positions should be visible to all users, but a closed position should only be visible to recruiters, and the related hiring manager. Only recruiters and their managers should be able to add sharing to a position. Tasks:  Answer the following questions, then update sharing accordingly: – What should the organization-wide default for positions be? – Who should own positions? – Should “Grant Access Using Hierarchies” be checked? – How will recruiters get access to their closed positions? Open positions? – How will all users get access to new and open positions? – How will hiring managers get access to their closed positions? Open positions? – How will approvers get access to their closed positions? Open positions? 170

© Copyright 2013 salesforce.com, inc.

85

Application Essentials

10-2: Restrict Data Access 20 min

Your Turn

Goal: Ensure that the salary for any position is visible only to the recruiter, the hiring manager, and the hiring manager’s boss. Scenario: Universal Containers has decided that salary information for any position should be visible only to the recruiter, the hiring manager for that position, and the hiring manager’s boss. The recruiter should control the salary data.

LY

Tasks:

171

N

AL

U

SE

O N

Determine how to store this information to meet the visibility requirements outlined above.

TE R

Module Agenda

 Limiting Data Access

IN

 Which Tool to Use?

172

© Copyright 2013 salesforce.com, inc.

86

Application Essentials

Which Tool to Use? 1. While filling out positions, the hiring manager wants to fill out the job responsibilities and job description at the top of the page. 2. The recruiter needs to see the name of the hiring manager and the status of the position first.

173

N

AL

U

SE

O N

LY

3. Which tool would you use?

TE R

Which Tool to Use? (cont.)

IN

1. When creating new technical positions, hiring managers should always have to fill out which certifications are required. 2. When creating non-technical positions, such as positions in sales and finance, there is no need to see or populate the certification fields. 3. Which tool would you use?

174

© Copyright 2013 salesforce.com, inc.

87

Application Essentials

Which Tool to Use? (cont.) 1. Interviewers should NEVER see a candidate’s Social Security Number.

175

N

AL

U

SE

O N

LY

2. Which tool would you use?

TE R

Module Review

1. Which feature establishes the baseline level of access a user has to records they do not own?

IN

2. If a developer wanted interviewers to see positions, but never see the Pay Grade listed on a position, which tool would the developer use? 3. If a developer wanted to share records with a group of users who were not all in the same role, how could the developer do it without creating multiple sharing rules? 4. True or False: System Administrators can see every record in Salesforce.

176

© Copyright 2013 salesforce.com, inc.

88

Application Essentials

SE

O N

LY

Module 11: Building Business Processes

N

AL

U

177

TE R

Application Building Blocks User Interface

Visualforce Pages Web Controls Sites

Workflow Validation Rules Approval Processes

Business Logic

Visualforce Page Controllers Apex Code SOAP API

IN

Applications Tabs Page Layouts Record Types

Objects Fields Relationships

Data Model

SOAP API Metadata API

Declarative

Programmatic

Simplicity + Speed

Control + Flexibility 178

© Copyright 2013 salesforce.com, inc.

89

Application Essentials

Module Objectives By the end of this module, you will be able to:  List typical business requirements in the area of business processes.  List some features of the Force.com platform that help you implement business processes.

 Describe how the VLOOKUP function can be used to solve a business requirement.

LY

 Describe how the REGEX function can be used to solve a business requirement.

179

N

AL

U

SE

O N

 Describe how the ISCHANGED, ISNEW, and PRIORVALUE functions can be used to solve a business requirement.

TE R

Module Agenda

 Typical Business Requirements

 Features of the Force.com Platform That Can Help

IN

 Useful Operators and Functions  Monitoring Processes

180

© Copyright 2013 salesforce.com, inc.

90

Application Essentials

Typical Business Requirements Preserving data quality  Example: As new positions are entered, Universal Containers would like to ensure that the appropriate fields are filled out. Automating processes  Example: Positions must be approved before recruiters start recruiting for them. Keeping processes from getting “stuck”  Example: A position open for more than 30 days without candidates triggers an email to the recruiter to jump start recruitment procedures.

LY

Keeping systems in sync

O N

 Example: Outbound messages help keep Salesforce in sync with other systems. Auditing

181

N

AL

U

SE

 Example: Track any changes to the ranking of a candidate.

TE R

Module Agenda

 Typical Business Requirements

 Features of the Force.com Platform That Can Help

IN

 Useful Operators and Functions  Monitoring Processes

182

© Copyright 2013 salesforce.com, inc.

91

Application Essentials

Features of the Force.com Platform There are a number of features that address and automate management of these business requirements.  Formula fields  Validation rules  Approval Processes  Workflow Actions  Outbound Messaging

LY

 Field History Tracking

183

N

AL

U

SE

O N

 Setup Audit Trail

TE R

Module Agenda

 Typical Business Requirements

 Features of the Force.com Platform That Can Help

IN

 Useful Operators and Functions  Monitoring Processes

184

© Copyright 2013 salesforce.com, inc.

92

Application Essentials

185

N

AL

U

SE

O N

LY

Useful Operators and Functions

TE R

Useful Operators and Functions (cont.) ISCHANGED

IN

 Compares the value of a field to the previous value and returns TRUE if the values are different. If the values are the same, this function returns FALSE.  Example: Prevent users from changing the Pay Grade of a position after it’s been approved. PRIORVALUE  Returns the previous value of a field.  Example: As negotiations take place, HR would like to track changes to the salary listed on the offer.

186

© Copyright 2013 salesforce.com, inc.

93

Application Essentials

Useful Operators and Functions (cont.) IF  Determines if expressions are true or false. Returns a given value if true and another value if false.  Example: If the offer expiration date is less than today and the offer status is set to sent, display “Follow Up on Offer,” otherwise, the field should be blank.

ISNEW  Checks if the formula is running during the creation of a new record and returns TRUE if it is. If an existing record is being updated, this function returns FALSE.

187

N

AL

U

SE

O N

LY

 Example: Ensure that hiring managers don’t back date the open date on a position to increase its perceived urgency by using ISNEW and checking whether the Open Date < Today().

TE R

Useful Operators and Functions (cont.) ISPICKVAL

 Determines if the value of a picklist field is equal to a string you specify.

IN

 Example: Use in conjunction with IF to test if the status of an offer is accepted. If so, show the Actual Salary * 10% to calculate a bonus amount, otherwise, display no value.  IF(ISPICKVAL(Status__c, “Accepted"), *0.1, 2) , 0)

ROUND( Actual_Salary__c

 Note: ISPICKVAL is not used alone. It must be used any time that you’re referring to a field that is a picklist (except when using the CASE function). REGEX  Compares a text field to a regular expression and returns TRUE if there is a match. Otherwise, it returns FALSE. A regular expression is a string used to describe a format of a string according to certain syntax rules.

 Example: Check to make sure that the social security number of a candidate matches a regular expression representing a valid social security number in the correct format.

188

© Copyright 2013 salesforce.com, inc.

94

Application Essentials

Useful Operators and Functions (cont.) VLOOKUP  Returns a value by looking up a related value on a custom object similar to the VLOOKUP() Excel function.  Note: This formula checks against a key and returns a value from that key.  Example: Check the state and zip code entered on a record against a table of states and zip codes (key) to ensure that the state and zip code match (returns the value).

ISNUMBER

LY

 Determines if a text value is a number and returns TRUE if it is. Otherwise, it returns FALSE.

189

N

AL

U

SE

O N

 Example: Check to make sure the contract number for a contractor in a temporary position is strictly numerical digits.

CASE

TE R

Useful Operators and Functions (cont.)

IN

 Checks a given expression against a series of values. If the expression is equal to a value, returns the corresponding result. If it is not equal to any values, it returns the else_result.  Example: Use CASE to evaluate the number of days that a position is open, and display a value depending on the result. For positions open 1 week, display “Maintain,” for positions open 4 weeks, display “Assign Task,” etc.

IMAGE  Inserts an image with alternate text and height/width specifications.  Example: If status is “Escalated,” show a red flag, if status is “Under Review,” show a yellow flag, if status is “All Clear” show a green flag.

190

© Copyright 2013 salesforce.com, inc.

95

Application Essentials

Useful Operators and Functions (cont.) Functions for encoding  HTMLENCODE  JSENCODE  JSINHTMLENCODE  URLENCODE

These functions make it safe to insert data that you do not control, such as merge field values and URL parameters in your custom buttons, links, and Force.com pages.

SE

O N

LY

The encoding functions escape or replace characters that are reserved or unsafe in HTML, JavaScript, and URLs.

N

AL

U

191

TE R

Function Considerations

IN

CASE IF

Approval Processes

Default Values

Field Updates

Formula Field

Workflow Rules

Validation Rules



























IMAGE

ISCHANGED



*



ISNEW





















*









ISNUMBER



ISPICKVAL





PRIORVALUE REGEX









VLOOKUP

*ISCHANGED and PRIORVALUE in workflow rules ONLY when rule evaluated “Every time the record is created or updated.”

192

© Copyright 2013 salesforce.com, inc.

96

Application Essentials

11-1: Create Formula Fields to Display Images 10 min

Join Me

Goal: Build a formula field that displays an image. Scenario: Universal Containers would like to add a visual indicator of the Rating on a job application. Job Applications with a high rating should display a green flag; a medium rating should display a yellow flag; and a low rating should display a red flag. Universal Containers can take advantage of a number of sample images available on the Salesforce servers.

LY

Tasks: 1. Create a new formula field to show a red, yellow, or green flag on a job application record, depending on the Average Review Score.

193

N

AL

U

SE

O N

2. Add the new Rating field to the Job Application related list on the Position page layout.

15 min

Goal:

Build a formula field that displays a hyperlink.

IN

Your Turn

TE R

11-2: Create Formula Fields to Display Hyperlinks

Scenario: Universal Containers would like to be able to click a link on the candidate object to see a photo of the candidate. The images will be stored in the Documents tab, so the company will need to create a field to capture the ID, a field to create the URL, and a field with a link that users can click to see the picture, as well as embedding the image into the page. Tasks: 1. Create a field for the Picture ID. 2. Populate a candidate record’s Picture ID field, then click the Picture Link to view the picture.

194

© Copyright 2013 salesforce.com, inc.

97

Application Essentials

Module Agenda  Typical Business Requirements  Features of the Force.com Platform That Can Help  Useful Operators and Functions

195

N

AL

U

SE

O N

LY

 Monitoring Processes

TE R

What are Debug Logs? The debug log records errors and system processes that occur in your organization. Debug logs contain information about:

IN

 Database changes

 Automated workflow processes, such as: – – – – – – –

Workflow rules Assignment rules Escalation rules Approval process Auto-response rules Validation rules Request-response XML

– Apex code script errors – Resources used by a Apex code script

196

© Copyright 2013 salesforce.com, inc.

98

Application Essentials

What are Debug Logs? (cont.)  Developers can retain and manage the debug logs for specific users.  Filters allow you to select which information is written to the logs.  Debug Logs are limited to: – 20 per user. – 2 MB per log.

197

N

AL

U

SE

O N

LY

– 50 MB per organization.

IN

TE R

Developer Console

Working with Code

View execution stats

Logs

© Copyright 2013 salesforce.com, inc.

99

Application Essentials

Log Categories  Database - database activity, including every data manipulation language (DML) statement or inline SOQL or SOSL query  Workflow- workflow rules, such as the rule name, the actions taken, etc.  Validation - information about validation rules, such as the name of the rule, whether the rule evaluated true or false, etc.

 Callout - request-response XML that the server is sending and receiving from an external Web service.

199

N

AL

U

SE

O N

LY

– Useful when debugging issues related to using Force.com SOAPbased Web Services API calls

TE R

Log Categories (cont.)

IN

 Apex Code - information about Apex code and can include information such as log messages generated by DML statements, inline SOQL or SOSL queries, the start and completion of any triggers, and the start and completion of any test method, etc.  Apex Profiling - cumulative profiling information, such as the limits for your namespace, the number of emails sent, etc.  Visualforce - information about Visualforce events including serialization and deserialization of the view state or the evaluation of a formula field in a Visualforce page  System - information about calls to all system methods such as the System.debug method

200

© Copyright 2013 salesforce.com, inc.

100

Application Essentials

Log Levels in the Developer Console  Developers can specify log levels to indicate the level of detail to capture.  Levels include: – Error, Warn, Info – Debug – Fine, Finer – Finest

201

N

AL

U

SE

O N

LY

 For detailed information about what is captured at each level, please see Help & Training.

IN

TE R

Additional Developer Console Tools

Tests Tool

Query Editor

202

© Copyright 2013 salesforce.com, inc.

101

Application Essentials

Troubleshooting with Debug Log/Developer Console Use the debug log to troubleshoot automated actions.  Symptom: A workflow field update doesn’t seem to be updating. – Possible problem: The field update is working, but a Apex code trigger is overwriting the update.  Symptom: A record submitted for approval is not routed to the user that you expected.

203

N

AL

U

SE

O N

LY

– Possible problem: You have multiple approval processes on a single object. Your record meets the criteria for both, and the order of processes is incorrect.

TE R

Module Review

1. What actions are tracked in debug logs?

IN

2. What is the maximum number of debug logs retained per user? 3. Which function verifies the format of the data? 4. What are the functions to access data in a picklist?

204

© Copyright 2013 salesforce.com, inc.

102

Application Essentials

205

N

AL

U

SE

O N

LY

Module 12: Preserving Data Quality

TE R

Module Objectives By the end of this module, you will be able to:

IN

 Create a validation rule to enforce conditional required behavior.  Create a validation rule using the REGEX function to enforce proper data format.  Create a validation rule with VLOOKUP to enforce data consistency.  Create a validation rule that prevents records from being added or deleted.

206

© Copyright 2013 salesforce.com, inc.

103

Application Essentials

Module Agenda  Enforcing Conditionally Required Fields  Enforcing Proper Data Format  Enforcing Consistency

207

N

AL

U

SE

O N

LY

 Preventing Data Loss

TE R

Validation Rules

 Validation rules verify that the data a user enters in a record meets the standards you specify before the record is saved.

IN

 A validation rule contains a formula or expression that evaluates the data in one or more fields and returns a value of True or False.  Validation rules also include an error message to display to the user when the rule returns a value of True due to an invalid value.  Error message can be displayed directly below field or at top of the page. – Multiple error messages may be displayed at one time.

208

© Copyright 2013 salesforce.com, inc.

104

Application Essentials

Validation Rules (cont.)  Standard and custom User merge fields for the current user are also available, allowing user- and profile-specific validation rules.  IsChanged(field) function allows validation to be conditional based on whether a specific field value has changed.  PriorValue(field) allows access to previous value of field.

209

N

AL

U

SE

O N

LY

 IsNew() allows different validation rules for create vs. update actions.

10 min

Goal:

Create validation rules to enforce business requirements.

IN

Join Me

TE R

12-1: Create Validation Rules

Scenario: Universal Containers (UC) employees should not be able to save a position record unless the Hiring Manager field is filled out. Tasks: Add a validation rule that requires that all positions must have a Hiring Manager listed.

210

© Copyright 2013 salesforce.com, inc.

105

Application Essentials

12-2: Build Validation Rules to Enforce Conditionally Required Fields 10 min

Your Turn

Goal: Build a validation rule that prevents users from saving Temp positions with a blank Duration. Scenario: Universal Containers would like to enforce its policies around Temporary positions. The Duration field on a Temp position should not be blank. It should contain a value between 1 and 365.

LY

Tasks:

O N

1. Build a new validation rule that ensures that these policies are followed. 2. Set the Debug Log to track actions that you take.

211

N

AL

U

SE

3. Create a new position to test that the validation rule works.

TE R

Module Agenda

 Enforcing Conditionally Required Fields

 Enforcing Proper Data Format

IN

 Enforcing Consistency  Preventing Data Loss

212

© Copyright 2013 salesforce.com, inc.

106

Application Essentials

Enforcing Proper Data Format Validation rules can be used to enforce proper data format. For example:  US phone numbers should have 10 digits.  Zip codes should follow the format 99999 or 99999-9999.  Billing State in the US and Canada should be valid postal codes (2 letter, capitalized abbreviations).  Drivers license numbers should follow the proper format for their state.

213

AL

U

SE

O N

LY

 Credit card numbers should follow the appropriate format for their type.

10 min

Goal:

Build a validation rule that enforces proper data format.

IN

Your Turn

TE R

N

12-3: Build Validation Rules to Enforce Data Format

Scenario: Universal Containers would like to make sure that when candidates are entered, the zip code is entered in the correct format. Tasks: Create a validation rule on candidates that requires that zip codes be entered in a valid 5-digit or 9-digit format.

214

© Copyright 2013 salesforce.com, inc.

107

Application Essentials

Module Agenda  Enforcing Conditionally Required Fields  Enforcing Proper Data Format  Enforcing Consistency

215

N

AL

U

SE

O N

LY

 Preventing Data Loss

TE R

Enforcing Data Consistency

IN

Validation rules in combination with the vlookup function can be used to enforce the consistency of data in Salesforce. For example:

 Ensure that the zip code and state entered on a record match.  Ensure that the city and state entered on a record match (i.e. that the city exists within the state that was entered).

216

© Copyright 2013 salesforce.com, inc.

108

Application Essentials

12-4: Build Validation Rules to Enforce Consistency 15 min

Goal:

Your Turn

Build a validation rule that enforces data consistency. Scenario: Universal Containers would like to ensure that when a zip code is entered, it matches the state that’s entered. For example, a candidate with a California zip code should not have a state of New York. This rule should be ignored when data is loaded in batch.

LY

Tasks:

217

N

AL

U

SE

O N

Create a validation rule that checks the zip code entered against a table to validate that the zip code and state match.

TE R

Module Agenda

 Enforcing Conditionally Required Fields

 Enforcing Proper Data Format

IN

 Enforcing Consistency  Preventing Data Loss

218

© Copyright 2013 salesforce.com, inc.

109

Application Essentials

Preventing Data Loss  Validation rules can be used to prevent users from adding or deleting records.  In this case, validation rules are used in conjunction with a Roll-Up Summary Field (RSF). – First, build a RSF on the parent object that sums the number of child records. – Then, create a validation rule on the parent object that conditionally prevents changes to the number listed in the RSF.

219

AL

U

SE

O N

LY

– If a user tries to add or delete a record, the validation rule will fire and prevent users from adding or deleting.

10 min

Goal:

Build a validation rule that prevents users from adding or deleting reviews once a job application has been approved.

IN

Join Me

TE R

N

12-5: Create Validation Rules to Prevent Data Loss (Optional)

Scenario: Universal Containers would like make sure that once a job application is approved, users will not be able to add or remove reviews. Tasks: Create a validation rule that references the Roll-Up Summary Field (RSF) to ensure that reviews are not added or deleted.

220

© Copyright 2013 salesforce.com, inc.

110

Application Essentials

Module Review 1. When are validation rules applied? 2. When setting up a validation rule, the developer must write the Error Condition Formula and the ______. 3. True or False: Validation rules are enforced through the API.

221

N

AL

U

SE

O N

LY

4. List use cases for utilizing validation rules.

IN

TE R

Module 13: Automating Business Processes with Workflow

222

© Copyright 2013 salesforce.com, inc.

111

Application Essentials

Module Objectives By the end of this module, you will be able to:  List the actions that can be triggered by a workflow rule.  Describe the difference between time-dependent and immediate workflow actions.  Create an escalation channel using time-dependent workflow.

223

N

AL

U

SE

O N

LY

 Describe use cases for workflow.

TE R

Module Agenda  Workflow Rules

IN

 Time-Dependent Workflow Rules

224

© Copyright 2013 salesforce.com, inc.

112

Application Essentials

Workflow Rules Automate business processes  Triggered on record creation or update  Execute Actions – Immediately and/or – Later (only if record still meets entry criteria)

Time Immediate Immediate Dependent Actions Actions Actions

LY

Immediate Immediate Immediate Actions Actions Actions

SE

O N

Entry Criteria

N

AL

U

225

TE R

Workflow Rule Configuration

IN

 Entry criteria: which records – Object Type – Evaluation Criteria – Rule Criteria  Timing: when to execute actions – Immediately – Time Dependent  Actions: what to do – Assign Task – Send Email Alert • From current user’s email address • From organization-wide email – Update Field – Post Outbound SOAP Message

Workflow Rule Immediate Actions

Time Triggered Actions

226

© Copyright 2013 salesforce.com, inc.

113

Application Essentials

13-1: Create Workflow Rules 15 min

Join Me

Goal: Create custom workflow rules and associated field updates for routing new Positions and Candidates to the recruiters. Scenario:  At Universal Containers (UC), recruiters are responsible for approving or rejecting proposed positions created by hiring managers. UC has determined that when a new Position is created, ownership of the position should automatically be assigned to the recruiter queue and an email alert should go out to all members of the queue.

LY

 When a new candidate has been created, the candidate should be assigned to the Recruiter Queue and a New Candidate Notification should automatically be sent out to all queue members. Tasks:

O N

1. Create a workflow rule with a field update to route new Positions to the Recruiting Queue.

227

N

AL

U

SE

2. Create a workflow rule with a field update to assign new candidates to the Recruiting Queue.

TE R

Module Agenda  Workflow Rules

IN

 Time-Dependent Workflow Rules

228

© Copyright 2013 salesforce.com, inc.

114

Application Essentials

What is Time-Dependent Workflow? Workflow actions  Immediate: actions fire as soon as a record meets the criteria  Time-Dependent: actions fire based on elapsed time (evaluated off of any date field in Salesforce) – Time-dependent actions have a time trigger.

229

N

AL

U

SE

O N

LY

– With time-dependent actions, the action is queued to fire as soon as the workflow criteria is met; however, the action will not occur until it meets the time trigger.

TE R

Time-Dependent Workflow Considerations  Time-dependent workflow cannot be used when a rule is set to be evaluated Every time a record is created or updated.

IN

 When a new workflow rule is created, it does not affect existing records.  Developers can monitor and remove pending actions by viewing the time-dependent workflow queue.  If a record that has an action pending against it in the time-based workflow queue is modified so that the record no longer meets the criteria, or the timing changes, the action will be updated in the queue.

230

© Copyright 2013 salesforce.com, inc.

115

Application Essentials

Time-Dependent Workflow Use Cases  If the status of an offer is Sent for more than 2 days, assign a task to the owner of the offer reminding them to follow up.  If the number of interviewers associated with a position is zero for more than 30 days after the position is created, send an email to the hiring manager.

231

N

AL

U

SE

O N

LY

 If a critical position remains in an Open status for more than 14 days, assign a task to the owner.

15 min

Goal:

Create a workflow rule that will escalate offers that have been open for two days.

IN

Your Turn

TE R

13-2: Set Up Time-Dependent Workflow

Scenario: When an offer is made to a candidate, it is valid for only two days. Universal Containers would like to set up a time-dependent workflow rule that evaluates offers in a sent status, and sends a task to the offer owner to remind them to follow up with the candidate. Tasks: 1. Create a workflow rule with time-dependent actions. 2. Create a new offer to test the process and monitor the timebased workflow queue. 232

© Copyright 2013 salesforce.com, inc.

116

Application Essentials

13-3: Set Up Time-Dependent Workflow (Optional) 15 min

Your Turn

Goal: Create a workflow rule that will escalate positions if there are no interviewers after 30 days. Scenario: At Universal Containers, positions have interviewers associated with them. If a position has no interviewers attached to it after 30 days, an email should be sent to the position owner. Tasks:

LY

1. Create a workflow rule with time-dependent actions.

233

TE R

Review

N

AL

U

SE

O N

2. Create a new position to test the process and monitor the time-based workflow queue.

1. What are the four actions that can be associated with a workflow rule?

IN

2. True or False: Time-Dependent workflow can be used when a workflow rule is set to evaluate “Every time a record is created or updated.” 3. True or False: The only way to test whether a timedependent workflow rule is executing as expected is to wait.

234

© Copyright 2013 salesforce.com, inc.

117

Application Essentials

235

N

AL

U

SE

O N

LY

Module 14: Automating Business Processes with Approval Processes

TE R

Module Objectives By the end of this module, you will be able to:

 List the components of a multi-step approval process.

IN

 Implement a 3-step approval process.  Implement a 3-step approval process with an optional step in the middle (skip a step).  Create an approval process with parallel approvers.  Create an outbound message as part of an approval process.  View debug log.  Configure debug log to set category and level.

236

© Copyright 2013 salesforce.com, inc.

118

Application Essentials

Module Agenda  Multi-Step Approval Processes  Skipping Steps in Approval Processes  Approval Processes with Parallel Approvers  Keeping Systems in Sync with Outbound Messaging

237

N

AL

U

SE

O N

LY

 Keeping Your Processes Flexible with Dynamic Approval Routing

TE R

Approval Processes

IN

Approval processes are single- or multi-step processes that require end user authorization for record promotion.

Entry Criteria

Final Immediate Immediate Approval Actions Actions Actions Initial Immediate Immediate Submission Actions Actions Actions

Approval Immediate Immediate Steps Actions Actions

Recall Immediate Immediate Actions Actions Actions

Final Immediate Immediate Rejection Actions Actions Actions

238

© Copyright 2013 salesforce.com, inc.

119

Application Essentials

How Do I Define an Approval Process? Process Definition Which records should enter this process? What settings should apply to the whole process? Step Definition

Final Rejection Actions

Final Approval Actions

Recall Actions

What happens when a record is submitted for approval?

Who should records be routed to?

What happens when a record is rejected?

What happens when a record is approved?

What happens if a record is recalled from the process?

SE

O N

LY

Initial Submission Actions

N

AL

U

239

IN

TE R

Process Visualizer

 Provides a visual representation (read-only) of your approval processes

Entry Criteria

 Hover over or expand steps to see details

Yes Recalled Final Recall Act… Record Unlocked

240

© Copyright 2013 salesforce.com, inc.

120

Application Essentials

LY O N SE N

AL

U

241

TE R

Let’s Compare… Workflow Rules & Approval Processes Workflow Rules:

Approval Processes:

 Are triggered upon save.

 Are triggered only when a user clicks “Submit for Approval.”

IN

 Consist of one set of criteria and actions.

 Consist of multiple steps.  Have entry criteria, step criteria, and step actions.

 Can be modified or deleted.

 Have initial submission actions, rejection and approval actions, and actions for each step.  Have some attributes that can’t be modified (processes must be deactivated before they can be deleted).

Workflow Rules and Approval Processes can be used together. 242

© Copyright 2013 salesforce.com, inc.

121

Application Essentials

Module Agenda  Multi-Step Approval Processes  Skipping Steps in Approval Processes  Approval Processes with Parallel Approvers  Keeping Systems in Sync with Outbound Messaging

243

N

AL

U

SE

O N

LY

 Keeping Your Processes Flexible with Dynamic Approval Routing

TE R

Skipping Steps

 A skip step is a step that has criteria defined to determine whether or not this approval is required.

IN

 In processes that have steps that are optional depending on criteria, use the skip step feature.  To skip steps, use filter criteria or formula, then choose what should happen to records that do not meet the criteria. The options are: – Approve Record (approves the request and performs all final approval actions). – Go to Next Step (skips this step and goes to the next step).

244

© Copyright 2013 salesforce.com, inc.

122

Application Essentials

LY O N SE N

AL

U

245

30 min

Goal:

Create an approval process for approving new positions. Scenario:

IN

Join Me

TE R

14-1: Create Multi-Step Approval Processes

Universal Containers needs to make sure that all new positions receive the proper approval before they are posted.  Step 1: New positions should go to the manager of the hiring manager.  Step 2: All positions approved by the hiring manager’s manager should go to the recruiter (Mario Ruiz).  Step 3: Senior level positions should also be approved by the department VP. Tasks: 1.

Create a multi-step approval process.

2.

Create a new position to test the process. 246

© Copyright 2013 salesforce.com, inc.

123

Application Essentials

14-2: Create Approval Processes that Skip Steps 20 min

Your Turn

Goal: Modify the existing approval process to skip steps that are unnecessary. Scenario:

LY

Universal Containers would like all positions to be approved by the manager of the hiring manager. For senior-level positions, the position should then be approved by the department VP. After approval by the manager (and VP if necessary), positions should be routed to the recruiter. Tasks:

O N

1. Modify the existing multi-step approval process to change the order and skip the VP step if the position is not senior-level.

247

N

AL

U

SE

2. Create a new position to test the process.

TE R

Module Agenda

 Multi-Step Approval Processes

 Skipping Steps in Approval Processes

IN

 Approval Processes with Parallel Approvers  Keeping Systems in Sync with Outbound Messaging  Keeping Your Processes Flexible with Dynamic Approval Routing

248

© Copyright 2013 salesforce.com, inc.

124

Application Essentials

What are Parallel Approvers?  Parallel approval processes allow a record to be sent for approval to up to 25 different users simultaneously.

249

IN

TE R

N

AL

U

SE

O N

LY

 When setting up the process, developers choose the approvers, as well as whether the record requires unanimous approval or whether the record should be approved/rejected based on the first response.

250

© Copyright 2013 salesforce.com, inc.

125

Application Essentials

14-3: Create Parallel Approval Processes 15 min

Your Turn

Goal: Create an approval process that sends approvals to two approvers in parallel. Scenario: All job applications should be approved by the recruiter and the Vice President of HR. Both approvals can take place at the same time. Tasks:

251

N

AL

U

SE

O N

LY

Create a parallel approval process.

TE R

Module Agenda

 Multi-Step Approval Processes

 Skipping Steps in Approval Processes

IN

 Approval Processes with Parallel Approvers  Keeping Systems in Sync with Outbound Messaging  Keeping Your Processes Flexible with Dynamic Approval Routing

252

© Copyright 2013 salesforce.com, inc.

126

Application Essentials

What is Outbound Messaging?  Outbound messages send the information you specify to an endpoint you designate.  Workflow rules and approval processes can send outbound messages to an endpoint as a means of getting information to an external service.  The message is a secure configurable API message (in SOAP/XML format).

253

N

AL

U

SE

O N

LY

XML

10 min

Goal:

Modify an existing approval process to send an outbound message to an external HR system.

IN

Your Turn

TE R

14-4: Create Outbound Messages

Scenario: When a job application is approved, it should trigger an outbound message to an external HR system, as well as update fields and create a task in Salesforce. Tasks: Create an outbound message.

254

© Copyright 2013 salesforce.com, inc.

127

Application Essentials

Module Agenda  Multi-Step Approval Processes  Skipping Steps in Approval Processes  Approval Processes with Parallel Approvers  Keeping Systems in Sync with Outbound Messaging

255

N

AL

U

SE

O N

LY

 Keeping Your Processes Flexible with Dynamic Approval Routing

TE R

What is Dynamic Approval Routing?

IN

 Dynamic approval routing routes approval requests to users listed in lookup fields on the record requiring approval.  Dynamic approval routing allows records to be routed based on complex approval matrices.

256

© Copyright 2013 salesforce.com, inc.

128

Application Essentials

Steps to create a dynamic approval process: 1. Create lookup fields on the object being approved. 2. Create a custom object as an approval matrix. 3.

Populate the approval matrix.

4. Create Apex code to fill in the lookup fields from the approval matrix.

257

IN

TE R

N

AL

U

SE

O N

LY

5. Create or update an approval process to utilize the new lookup fields.

258

© Copyright 2013 salesforce.com, inc.

129

Application Essentials

Steps to create a dynamic approval process:



1. Create lookup fields on the object being approved. 2. Create a custom object as an approval matrix. 3.

Populate the approval matrix.

4. Create Apex code to fill in the lookup fields from the approval matrix.

259

IN

TE R

N

AL

U

SE

O N

LY

5. Create or update an approval process to utilize the new lookup fields.

260

© Copyright 2013 salesforce.com, inc.

130

Application Essentials

Steps to create a dynamic approval process:

 

1. Create lookup fields on the object being approved. 2. Create a custom object as an approval matrix. 3.

Populate the approval matrix.

4. Create Apex code to fill in the lookup fields from the approval matrix.

261

IN

TE R

N

AL

U

SE

O N

LY

5. Create or update an approval process to utilize the new lookup fields.

262

© Copyright 2013 salesforce.com, inc.

131

Application Essentials

Steps to create a dynamic approval process:

  

1. Create lookup fields on the object being approved. 2. Create a custom object as an approval matrix. 3.

Populate the approval matrix.

4. Create Apex code to fill in the lookup fields from the approval matrix.

263

IN

TE R

N

AL

U

SE

O N

LY

5. Create or update an approval process to utilize the new lookup fields.

264

© Copyright 2013 salesforce.com, inc.

132

Application Essentials

LY O N SE N

AL

U

265

1. Create lookup fields on the object being approved.

2. Create a custom object as an approval matrix. 3.

Populate the approval matrix.

IN

   

TE R

Steps to create a dynamic approval process:

4. Create Apex code to fill in the lookup fields from the approval matrix. 5. Create or update an approval process to utilize the new lookup fields.

266

© Copyright 2013 salesforce.com, inc.

133

Application Essentials

LY O N SE IN

TE R

N

AL

U

267

268

© Copyright 2013 salesforce.com, inc.

134

Application Essentials

14-5: Create Dynamic Approval Processes (Optional) 30 min

Goal:

Your Turn

Create a dynamic approval process. Scenario: At Universal Containers, not all approval processes route records to a particular user or manager. Universal Containers would like to have more flexibility with their approval processes (to refer to an approval matrix and route approvals based on users specified on the matrix).

LY

Tasks: 1. Add new approver fields on the Position object.

O N

2. Create an approval matrix in Salesforce.

269

N

AL

U

SE

3. Utilize the new approval matrix to make approval routing more dynamic.

TE R

Automated Processing Order Automated processes occur in the following order:

1. Validation Rules

IN

2. Assignment Rules

3. Auto-Response Rules 4. Workflow Rules (with immediate actions) 5. Escalation Rules 6. Parent roll-up summary field formula re-calculates 7. Criteria-based sharing evaluation

270

© Copyright 2013 salesforce.com, inc.

135

Application Essentials

Module Review 1. What are the components of a multi-step approval process? 2. When approval processes have parallel approvals, what setting must developers select?

271

N

AL

U

SE

O N

LY

3. What is an Outbound Message? In what format is it sent?

IN

TE R

Module 15: Automating Business Processes using Visual Workflow

272

© Copyright 2013 salesforce.com, inc.

136

Application Essentials

Module Objectives By the end of this module, you will be able to:  Describe the capabilities of Visual Workflow.

273

N

AL

U

SE

O N

LY

 Build and deploy a flow in the Cloud Flow Designer.

TE R

Module Agenda

 Understanding Visual Workflow

 Creating Flows

IN

 Deploying Flows

274

© Copyright 2013 salesforce.com, inc.

137

Application Essentials

Automating Business Processes Workflow Rules Automate specific actions  Assign a task  Send an email  Update a field value  Send an outbound message

Approval Processes Automate approving a record  Define steps for approval  Assign approver for each step

Outbound Message

SE

O N

LY

Visual Workflow Automate complex business processes  Navigate users through screens  Execute business rules  Query and update Salesforce data

N

AL

U

275

TE R

What is Visual Workflow? Contact found

IN

Yes

Contact not found

Create contact

276

© Copyright 2013 salesforce.com, inc.

138

Application Essentials

Module Agenda  Understanding Visual Workflow  Creating Flows

277

N

AL

U

SE

O N

LY

 Deploying Flows

TE R

Building a Flow in Cloud Flow Designer Add Elements

Connect Elements

Set Start Element

IN

Define Resources

Users with the “Manage Force.com Flow” permission can open flows.

Setup | Create | Workflows & Approvals | Flows 278

© Copyright 2013 salesforce.com, inc.

139

Application Essentials

15-1: Create a Flow 40 min

Goal: Create a flow using Visual Workflow. Scenario: Universal Containers is seeing a number of candidate records missing information. They want a candidate wizard created that includes all the needed information to complete the record. Tasks: 1. Create a flow. 2. Add a screen element to prompt for the candidate’s name. 3. Set the start element for the flow. 4. Add a screen element to prompt for the candidate’s contact information. 5. Add a screen element to prompt for the candidate’s experience and education. 6. Add a record create element to create a new candidate record. 7. Add a screen element to finish the wizard. 8. Save and run the flow.

279

Version 2

TE R

Flow Versions

N

AL

U

SE

O N

LY

Join Me

IN

Version 1

Only one version of the flow can be active at a time.

© Copyright 2013 salesforce.com, inc.

280

140

Application Essentials

Displaying Faults for Data Elements Faults are exceptions that can happen during the processing of a flow.

281

N

AL

U

SE

O N

LY

You can display faults by building in fault connectors.

40 min

Goal:

Create a flow using Visual Workflow. Scenario:

IN

Your Turn

TE R

15-2: Create a New Version of a Flow

Universal Containers is also seeing a number of duplicate candidate records being created. They want to add a record lookup to the candidate wizard to check if the candidate is already in the system based on their name. Tasks: 1.

Open an existing flow.

2.

Add a record lookup element to check if the candidate exists.

3.

Save a new version of the flow.

4.

Add a decision element based on the lookup element.

5.

Add a screen element to display faults for data elements.

6.

Save and run the flow. 282

© Copyright 2013 salesforce.com, inc.

141

Application Essentials

Module Agenda  Understanding Visual Workflow  Creating Flows

283

N

AL

U

SE

O N

LY

 Deploying Flows

IN

TE R

Deploying a Flow

Users with the “Run Flows” permission can run flows.

A Visualforce page can be used to deploy a flow. 284

© Copyright 2013 salesforce.com, inc.

142

Application Essentials

Salesforce.com URL Pass Arguments

Concatenate

/flow/Troubleshoot?varEmail={!Contact.Email}&retURL=/home/home.jsp

Set Flow Variable

Return URL

285

N

AL

U

SE

O N

LY

Flow URL

10 min

Goal:

Create a custom button on the candidate list view to run the candidate flow.

IN

Your Turn

TE R

15-3: Deploy a Flow

Scenario: Universal Containers would like to be able to launch the candidate wizard from the candidate list view. Tasks: 1. Activate the flow version. 2. Deploy the flow using a custom button. 3. Modify the Recruiting and HR profile to give them the Run Flows permission. 4. Run the flow.

286

© Copyright 2013 salesforce.com, inc.

143

Application Essentials

Visual Workflow Resources

287

TE R

Review

N

AL

U

SE

O N

LY

Cloud Flow Designer Workbook

1. What elements can be used to build a flow?

2. How many versions of a flow can be active at one time?

IN

3. What are the different ways a flow can be deployed?

288

© Copyright 2013 salesforce.com, inc.

144

Application Essentials

289

N

AL

U

SE

O N

LY

Module 16: Auditing Processes

TE R

Module Objectives By the end of this module, you will be able to:

IN

 List some of the features of the Force.com platform that allow for auditing of processes.  Examine the setup audit trail to identify configuration changes.  Set up field history tracking to monitor changes to field data.  Analyze options for preventing or recording changes to data in your Force.com application.

290

© Copyright 2013 salesforce.com, inc.

145

Application Essentials

Module Agenda  Auditing Configuration Changes  Auditing Data

291

N

AL

U

SE

O N

LY

 Keeping Track of Unauthorized Changes

TE R

Setup Audit Trail

 The Setup Audit Trail shows changes made to an organization’s setup.

IN

 Up to 20 changes are displayed within the application, but developers can export to a .csv file to see additional changes.  Changes are tracked for 180 days.

292

© Copyright 2013 salesforce.com, inc.

146

Application Essentials

16-1: Audit Changes Using Setup Audit Trail 10 min

Join Me

Goal: View the Setup Audit Trail. Scenario: Universal Containers needs to be able to track all changes to Salesforce. Tasks: 1. View Setup Audit Trail.

LY

2. Create a new field to see how it appears in the Setup Audit Trail.

293

N

AL

U

SE

O N

3. View the addition of the Drivers License Number field in Setup Audit Trail.

TE R

Module Agenda

 Auditing Configuration Changes

 Auditing Data

IN

 Keeping Track of Unauthorized Changes

294

© Copyright 2013 salesforce.com, inc.

147

Application Essentials

Field History Tracking  Field History Tracking allows developers to choose up to 20 fields per objects for which they would like to track changes.  For most field types, the old and new values are tracked, as well as the date and time of the change and the user who made the change.

295

N

AL

U

SE

O N

LY

 For long text area fields and multi-select picklists are tracked as edited; however, the old and new values are not noted.

TE R

Logging Comparison

Debug Logs

Field History

Setup Audit Trail

Errors and system processes performed by end users or code

Data values for fields

Configuration changes by administrators and developers

Examples

Execution of Apex code trigger or workflow rule

Updates to Status or Pay Grade field

Change to a workflow rule, field data type

Limits

20 logs per user

20 Fields per object

Stored for 180 days

IN

Tracks

2 MB per log

50 MB per org

296

© Copyright 2013 salesforce.com, inc.

148

Application Essentials

16-2: Audit Changes to Data 10 min

Goal:

Your Turn

Set up Field History Tracking to track changes to specified fields. Scenario: Universal Containers needs to be able to track changes to any field on reviews. Tasks:

297

N

AL

U

SE

O N

LY

Set up Field History Tracking on reviews.

TE R

Module Agenda

 Auditing Configuration Changes

 Auditing Data

IN

 Keeping Track of Unauthorized Changes

298

© Copyright 2013 salesforce.com, inc.

149

Application Essentials

Which Tool to Use?  A developer at Universal Containers needs to make sure that the format of a contract number for contractors in temporary positions always follows the same format.  The contract number should not even be entered in the system if it doesn’t follow the proper format.

299

N

AL

U

SE

O N

LY

 Which tool should the developer use?

TE R

Which Tool to Use? (cont.)

IN

 Sometimes contractors in temporary positions will stay in that position throughout the duration of multiple contracts. Universal Containers would like to track any changes to the contract number field.  Which tool should the developer use?

300

© Copyright 2013 salesforce.com, inc.

150

Application Essentials

Which Tool to Use? (cont.)  A developer left Universal Containers and auditors would like to understand the changes that the developer made to the configuration of Salesforce before departing.

301

N

AL

U

SE

O N

LY

 Which tool should be used?

TE R

Which Tool to Use? (cont.)

IN

 When new candidate records are created, Universal Containers tracks whether or not a visa is required for that candidate. If a candidate requires a visa, Universal Containers would like to send an email to the recruiter to ensure that the proper hiring procedures are followed.  Which tool would you use?

302

© Copyright 2013 salesforce.com, inc.

151

Application Essentials

Which Tool to Use? (cont.)

303

N

AL

U

SE

O N

LY

 If Universal Containers wanted to not only send an email if a candidate required a visa, but also require approvals from the hiring manager and HR, which tool would you use?

TE R

Module Review

1. What changes are tracked in the Setup Audit Trail?

IN

2. True or False: Field History Tracking tracks both the old and new values of fields for all field types.

304

© Copyright 2013 salesforce.com, inc.

152

Application Essentials

305

N

AL

U

SE

O N

LY

Module 17: Data Management

TE R

Module Agenda  Export data

 Delete data

IN

 Insert data

 Update data  Upsert data  Tools for Data Management  Bulk API

306

© Copyright 2013 salesforce.com, inc.

153

Application Essentials

Exporting Data  Data can be exported from Salesforce  Used for: – Backing up data – Obtaining the ID for various records

307

N

AL

U

SE

O N

data Export

LY

– Getting data in order to modify/add to data

TE R

Module Agenda  Export data

 Delete data

IN

 Insert data

 Update data  Upsert data  Tools for Data Management  Bulk API

308

© Copyright 2013 salesforce.com, inc.

154

Application Essentials

Deleting Data  Data can be deleted from Salesforce.  Used for: – Free up space – Fix mistakes!

O N

LY

Deleting data

309

N

AL

U

SE

Export the data as a backup before deleting data.

TE R

Module Agenda  Export data

 Delete data

IN

 Insert data

 Update data  Upsert data  Tools for Data Management  Bulk API

310

© Copyright 2013 salesforce.com, inc.

155

Application Essentials

Inserting Data  Data from .csv files can be uploaded.  Used for: – Initial setup. – data migration from legacy/outside systems.

311

N

AL

U

SE

O N

data Insert

LY

– Loading data into a sandbox.

TE R

Inserting System Fields  Set System fields during initial record creation

 Only accessible through API-based Data Management Tools

IN

 Restricted to only Account, Opportunity, Contact, Lead, Case, Task, and Event standard objects.  Can be used on all custom objects

This feature must be enabled by Customer Support. 312

© Copyright 2013 salesforce.com, inc.

156

Application Essentials

Module Agenda  Export data  Delete data  Insert data  Update data  Upsert data  Tools for Data Management

313

TE R

Updating Data

N

AL

U

SE

O N

LY

 Bulk API

 Data is matched to existing records in order to update them.

 Used for:

IN

– Adding data to existing records – Transferring record ownership to a different user

Update Existing Records Match ID to Existing Records

Send Error to File

© Copyright 2013 salesforce.com, inc.

157

314

Application Essentials

Salesforce Record IDs  Salesforce generates an ID value when a new record is created.  Salesforce.com Object IDs come in two forms: – 15-digit unique case-sensitive form 005E0000000KF38 – 18-digit unique case-insensitive form

O N

LY

005E0000000KF38iaG

315

N

AL

U

SE

When working with a case-insensitive tool (like Excel) the case-sensitive ID may list duplicate records when the records are different.

TE R

Where to Get Salesforce IDs

1.URL

 URL: 15 digit

IN

 IDs may be obtained via: 2.Report

 Report: 15 digit

3.SOAP-based Web Services API

 SOAP API: 18 digit

4.Formulas

 Formulas: 15 digit  Apex: 18-digit  Visualforce: 18-digit

316

© Copyright 2013 salesforce.com, inc.

158

Application Essentials

Mass Transferring Records  Use Mass Transfer tool to transfer ownership from one user to another.

317

N

AL

U

SE

O N

LY

 Requires: – Transfer Record/ Transfer Leads permission – Edit on the object – Read on the records being transferred.

10 min

Goal:

Utilize the mass transfer records feature of the Force.com platform to assign proper ownership of records.

IN

Your Turn

TE R

17-1: Mass Transfer Ownership of Records

Scenario: Universal Containers (UC) realizes that the recruiting data loaded into its Recruiting App has been assigned to the wrong owner. The company needs to clean up the ownership without executing an additional data load. Tasks: Use the mass transfer records feature to assign all positions, job applications, candidates, and offers to Phil Katz.

318

© Copyright 2013 salesforce.com, inc.

159

Application Essentials

Module Agenda  Export data  Delete data  Insert data  Update data  Upsert data  Tools for Data Management

319

TE R

Upsert Data

N

AL

U

SE

O N

LY

 Bulk API

 Upsert uses the Salesforce ID or an external ID to either create a new record or update an existing record.

IN

– If the ID is not matched, a new record is created. – If the ID is matched once, the existing record is updated. – If the ID is matched multiple times, an error is reported.  Use upsert when importing data to prevent the creation of duplicates.

Update Existing Records

Create New Record

Match ID to Existing Records

Send Error to File

© Copyright 2013 salesforce.com, inc.

160

320

Application Essentials

External IDs  Typically used for migrations and integrations between Salesforce and other systems: – Useful to have external foreign key to link data in both systems. – Helps in auditing flow of information across systems. – Use with upsert to integrate records from other systems.  A flag can be added to a custom field to mark it as a external ID.

LY

– Available on all objects that support custom fields.

SE

O N

– An object can have three External ID fields.

N

AL

U

321

TE R

External ID Upsert — Example Salesforce

ID

IN

Legacy System Position

Hiring Manager

p1

QA Tech

u1

p2

DBA

u1

p3

HR Asst

u2

Position Legacy ID

SF ID

Position

Hiring Manager

p1

a05p1

QA Tech

00501

p2

a05p2

DBA

00501

p3

a05p3

HR Asst

00502

1 Match Legacy System ID to Legacy ID field

322

© Copyright 2013 salesforce.com, inc.

161

Application Essentials

Object Relationships  Object relationships effect the order in which data can be managed.  Relationships are expressed through: – Related lists and lookups in the application.

323

N

AL

U

SE

O N

LY

– IDs (foreign keys) in the database.

TE R

Upsert with Relationships  Configure upsert action to traverse object relationships and use external IDs to discover existing record IDs.

IN

 No need to know record IDs to load data!

324

© Copyright 2013 salesforce.com, inc.

162

Application Essentials

External ID Upsert with Relationships — Example Salesforce

Legacy System Position

p1

QA Tech

p2

DBA

u2

p3

HR Asst

u3

2

Position

Hiring Manager u1

Legacy ID

SF ID

Position

Hiring Manager

p1

a05p1

QA Tech

00501

p2

a05p2

DBA

00502

p3

a05p3

HR Asst

00503

1 Match Legacy System ID to Legacy ID field 2

Place Salesforce ID of corresponding User in Position record to form lookup relationship

SF ID

Last Name

Legacy ID

00501

McCann

u1

00502

Jones

u2

00503

Hanson

u3 325

N

AL

U

3

Match Hiring Manager field to Legacy ID in User record.

3

SE

2

User

LY

ID

O N

1

TE R

Determine the Order to Load Data

IN

Universal Containers (UC) would like to load the legacy recruiting data into the Recruiting App, but wants to make sure the existing relationships are maintained. •

Determine what order the recruiting app objects should be loaded into the new recruiting app.

Object

Order

Candidates Interviewers Job Applications Offers

Positions Reviews Users 326

© Copyright 2013 salesforce.com, inc.

163

Application Essentials

Review 1. What is the advantage of performing upserts rather than insert on large data sets? 2. Why can it be dangerous to work with the 15-digit casesensitive form of the record ID? 3. How do you make a field an External ID field?

4. True or False: The Created Date can be updated for a record via the API as long as the Insertable System Fields feature is turned on.

LY

5. True or False: Users can mass transfer records to which they do not have read access.

327

N

AL

U

SE

O N

6. What happens if you perform an upsert on an child object, when the related parent object does not exist yet?

TE R

Module Agenda  Export data

 Delete data

IN

 Insert data

 Update data  Upsert data  Tools for data management  Bulk API

328

© Copyright 2013 salesforce.com, inc.

164

Application Essentials

Tools for Data Management Salesforce Import Wizards

API-Based Tools

 Accounts

 Open Source Tools

 Contacts

 Data Loader

 Leads

 Partner Tools

 Solutions

 Custom-built Tools

329

N

AL

U

SE

O N

LY

 Custom Objects

TE R

Import Wizards

 Easy to use tool to load:

– Accounts

IN

– Contacts – Leads

– Solutions – Custom Objects  Load 50,000 records or less

330

© Copyright 2013 salesforce.com, inc.

165

Application Essentials

Overview of API-Based Tools  Load any object supported by the API  Load more than 50,000 records  Schedule regular data loads  Export data for backup

331

N

AL

U

SE

O N

LY

 Mass delete supported objects

TE R

Apex Data Loader

 Is a fully supported salesforce.com product.  Supports import from CSV or export to CSV.

IN

 Supports loading from or exporting to a database via JDBC.  Supports custom relationships for upsert.  Can be run from command line. – Use for manual exports with specific criteria – Use to schedule automated exports at a specific time  Can be run in batch mode.

332

© Copyright 2013 salesforce.com, inc.

166

Application Essentials

Obtaining the Data Loader  Available for System Administrators to download from UE, EE, and DE orgs  Download at:

333

N

AL

U

SE

O N

LY

Setup | Data Management | Data Loader

15 min

Goal:

Upload the records from the positions.csv file into Salesforce. Scenario:

IN

Join Me

TE R

17-2: Upload Positions

Universal Containers (UC) would like to load legacy recruiting data into the Recruiting App. Tasks: 1. Download the legacy position data. 2. Upload the legacy position records. 3. Go into the app and view some of the positions you have inserted.

334

© Copyright 2013 salesforce.com, inc.

167

Application Essentials

Other Available API Data Management Tools

335

N

AL

U

SE

O N

LY

 Other data Management tools can be obtained from http://developer.force.com

TE R

Which Tool Do You Use?

IN

Universal Containers (UC) needs to loads legacy data into the Recruiting App. There are around 100 records and no data has been added to the new Recruiting app. •

Determine the pros and cons of using the available tools.

Tool

Pros

Cons

Import Wizard

Data Loader/ API Tool

336

© Copyright 2013 salesforce.com, inc.

168

Application Essentials

17-3: Upsert Candidates 10 min

Goal:

Your Turn

Insert the Candidate records via the Data Loader GUI tool. Scenario: Universal Containers (UC) would like to load legacy recruiting data into the Recruiting App while limiting the possibility of creating duplicate records. Tasks: 1. Upsert the candidate data from the Candidates.csv file into Salesforce.

337

N

AL

U

SE

O N

LY

2. Go into the app and view some of the candidates you have inserted.

10 min

Your Turn

TE R

17-4: Upsert Remaining Object Data (Optional) Goal:

Upsert the remaining legacy records via the Data Loader GUI tool.

IN

Scenario:

Universal Containers (UC) would like to load the rest of the legacy recruiting data into the Recruiting App. Tasks: Execute an upsert of the legacy records via the Data Loader using existing mapping files.

338

© Copyright 2013 salesforce.com, inc.

169

Application Essentials

Module Agenda  Export data  Delete data  Insert data  Update data  Upsert data  Tools for Data Management

339

TE R

Bulk API

N

AL

U

SE

O N

LY

 Bulk API

The Bulk API for high-volume data loads is designed to:

 Improve throughput when loading large data sets into Salesforce.

IN

 Increase stability, monitoring, and control of high-volume data loads.  Allow better control and optimization of data center resources during data loads.

The Bulk API should only be used for over 50k records or for time-sensitive loads if there are over 200 records.

© Copyright 2013 salesforce.com, inc.

170

340

Application Essentials

Bulk API Architecture Data is transferred at full network speeds, reducing dropped connections.

The whole data set is managed in a job that can be monitored and controlled from Setup menu.

Job

Client Send all data to server in large batches

The data set can be processed faster by allocating multiple servers to process in parallel.

Processing Servers Processing Thread Processing Thread Dequeue batch from job

Data batch Data batch Data batch

Insert or update records

LY

Check status Results Results

O N

Save results to job

Results

341

N

AL

U

SE

Retrieve results

TE R

Using Data Loader with the Bulk API  The data Loader uses the SOAP-based Web Services API by default.

 There is an additional Enable serial mode for Bulk API option.

IN

 When the Bulk API is selected, users with the Bulk API Hard Delete permission can perform a hard delete. – Hard delete bypasses the Recycle Bin, so deleted records do not consume storage space and there is no way to retrieve them.

342

© Copyright 2013 salesforce.com, inc.

171

Application Essentials

Monitoring Bulk Data Load Jobs  Monitoring bulk data loads requires the “Manage data Integrations” permission.

343

TE R

Review

N

AL

U

SE

O N

LY

 To track the status of bulk data load jobs, click Your Name | Setup | Monitoring | Bulk data Load Jobs.

1. True or False: The Data Loader is the only way to utilize the Bulk API.

IN

2. Can you import data into custom objects using the Salesforce Import Wizard? 3. How do you decide which import tool to use? 4. How can you ensure that you only have to map your columns once if you are doing multiple loads with the same kinds of files?

344

© Copyright 2013 salesforce.com, inc.

172

Application Essentials

345

User Interface Enhancements

TE R

Story

N

AL

U

SE

O N

LY

Module 18: Enhancing the User Interface Using Visualforce

IN

Recruiting Team — Mario Ruiz: The new recruiting application works great. I’d love a way to see more details about the candidate and position when looking at the job application. Comment · Unlike · Share · Yesterday at 10:04 AM Megan Smith likes this. Phil Katz I agree. I'd also love to be able to edit the offer date and status faster too. Like · Yesterday at 12:26 PM

To accomplish this, you need to learn:  The parts of a Visualforce page.  How to create a page.  How to create templates for pages.  The design recommendations for pages. 346

© Copyright 2013 salesforce.com, inc.

173

Application Essentials

Module Agenda  What is Visualforce?  Creating a Visualforce page  Parts of a Visualforce page  Templates in Visualforce

347

Visualforce Pages

TE R

Story

N

AL

U

SE

O N

LY

 Visualforce design recommendations

IN

Ben Stuart to Developer: The Recruiting team has been using the new recruiting app and has found that they need to update the expiration date and status on offers quite often. They have put in a request for a faster way to update those two fields. Can you do this? Comment · Unlike · Share · Yesterday at 4:04 PM Developer I don’t think this can be done declaratively, but I can do it using Visualforce. I’ll get right on it. Like · Today at 9:26 AM

348

© Copyright 2013 salesforce.com, inc.

174

Application Essentials

What is Visualforce?

Visualforce is the component-based user interface framework for the Force.com platform.

 Developer-generated interface  Provides full control of user interface and behavior

349

N

AL

U

SE

O N



LY

 Visualforce pages are created using a tag-based markup language.

TE R

Visualforce and the MVC

IN

User Input (clicks)

Controller Standard

View Pages

User Interface Page Layouts Visualforce

Components Business Logic Standard or Custom Apex

Custom Model Data and Objects

Data Model Salesforce Data and Objects

350

© Copyright 2013 salesforce.com, inc.

175

Application Essentials

Page Layouts vs. Visualforce Page Layout

Visualforce

 Interface generated automatically  Maintained by administrator  Limited control over behavior and look and feel  Automatically get new features  Only accessible within your org

   

Developer-generated interface Maintained by developer Full control of interface and behavior Does not automatically get new features  Can be accessed outside of Salesforce Behavior

LY

Custom

Page layout and custom Apex

Visualforce

Visualforce and custom Apex

SE

Custom

O N

Standard Page layout

351

N

AL

U

Look and Feel

Standard

TE R

When to Use Visualforce

IN

Use Visualforce when the customization cannot be done using declarative tools.

Use Visualforce if:

Do not use Visualforce if:

 Data to display is not stored in Salesforce.

 Desired functionality can be created with page layouts.

 Standard behavior needs to be overridden.

 Approval processes and visual flows meet your needs.

 Approval processes and visual flows do not meet your needs.

 Formula fields meet your needs.

 Formula fields do not meet your needs.  You need to change look and feel. 352

© Copyright 2013 salesforce.com, inc.

176

Application Essentials

18-1: Which is Best Solved Using Visualforce? 15 min

Join Me

Goal: Determine if these scenarios are best solved using Visualforce. Task:

353

N

AL

U

SE

O N

LY

Review each scenario and determine if Visualforce would be the best solution.

TE R

Module Agenda

 What is Visualforce?

 Creating a Visualforce page

IN

 Parts of a Visualforce page  Templates in Visualforce  Visualforce design recommendations

354

© Copyright 2013 salesforce.com, inc.

177

Application Essentials

Accessing Visualforce Pages Enter https://sfdc_instance/apex/page_name

LY

https://na14.salesforce.com/apex/HelloWorld Org Location

355

N

AL

U

SE

O N

Page Name

TE R

Tools to Develop Visualforce Pages

IN

Inline Editor

Developer Console

Force.com IDE in Eclipse

IDE

© Copyright 2013 salesforce.com, inc.

356

178

Application Essentials

O N

LY

Visualforce Development Mode

SE

Once enabled, the inline editor is always active when accessing a Visualforce page.

N

AL

U

357

IN

TE R

Inline Page Editor

Search syntax

Undo/redo

Change size

Disable editor

Save

Page syntax

Hide editor

Component reference

Where page is used

358

© Copyright 2013 salesforce.com, inc.

179

Application Essentials

18-2: Create a Visualforce Page 10 min

Join Me

Goal: Create and save the Offer Quick Edit Visualforce page. Scenario: The Universal Containers recruiting team needs a fast way to update the expiration data and status for offers. Tasks: 1. Perform the one-time setup steps to create Visualforce pages.

359

N

AL

U

SE

O N

LY

2. Create the Offer Quick Edit Visualforce page.

TE R

Where are Visualforce Pages Listed?

IN

Setup | Develop | Pages

API version used for page or component 360

© Copyright 2013 salesforce.com, inc.

180

Application Essentials

How to Access a Visualforce Page  Enter the page URL.

 Create buttons or hyperlinks that link to the page.

361

N

AL

U

SE

O N

LY

 Replace one of the automatically-generated pages with the page.

TE R

Module Agenda

 What is Visualforce?

 Creating a Visualforce page

IN

 Parts of a Visualforce page  Templates in Visualforce  Visualforce design recommendations

362

© Copyright 2013 salesforce.com, inc.

181

Application Essentials

What Can Be Included on a Visualforce Page?  Visualforce markup language elements  Standard Web-based content: – HTML – JavaScript (including Ajax) – CSS – Images

LY

– Flash  Text

O N

 File-based content

363

N

AL

U

SE

Visualforce pages can have up to 1 MB of content and can display up to 15 MB.

TE R

Elements of a Visualforce Page Comment

Controller

IN

HTML Hello {!$User.FirstName}! Text Component Component Attributevalue="Update"/> Hello!

TE R

What are Visualforce Controllers?

IN

A set of instructions that specify what happens when a user interacts with the components specified in the page.

 Controllers provide access to the data that can be displayed.  A standard controller exists for standard and custom Salesforce objects.

 A standard controller supports both single record and list views. Controller type



TE R

Component Examples— Displays all messages generated for all components on the current page.

IN



372

© Copyright 2013 salesforce.com, inc.

186

Application Essentials

Component Examples— Displays the Chatter feed for a record.

373

N

AL

U

SE

O N

LY



TE R

Component Examples— Enables a section of the page to allow users to enter and submit data.

IN

. . . . . .

374

© Copyright 2013 salesforce.com, inc.

187

Application Essentials

Component Examples— Displays an input element for a value that corresponds to a field on a Salesforce object. It respects the attributes of the associated field.

375

N

AL

U

SE

O N

LY



TE R

Component Examples— Displays the standard detail page for a particular object.

IN



376

© Copyright 2013 salesforce.com, inc.

188

Application Essentials

Visualforce Component Reference Available via the Component Reference link in the inline editor Lists all the standard components Component description

Usage example

377

N

AL

U

SE

O N

LY

Component attributes

15 min

Goal:

Use the component reference to answer the questions.

IN

Your Turn

TE R

18-4: Find Components and Their Attributes

Task:

Answer the questions in the exercise guide.

378

© Copyright 2013 salesforce.com, inc.

189

Application Essentials

Custom Components  Place a custom user interface element in a custom component to reuse it several times in one or more Visualforce pages.

 Custom component and attribute descriptions are added to your component reference.

379

N

AL

U

SE

O N

LY

. . .

15 min

Goal:

Modify the existing Offer Quick Edit page to include all the components needed to complete it.

IN

Join Me

TE R

18-5: Complete the Offer Quick Edit Page

Scenario: The Universal Containers recruiting team needs a fast way to update the expiration data and status for offers. Tasks: 1. Add the needed components to complete the Quick Edit section. 2. Hide the related lists on the page.

3. Test the new page.

380

© Copyright 2013 salesforce.com, inc.

190

Application Essentials

Visualforce Pages

Story

Ben Stuart to Developer: The Recruiting team has also requested that the candidate’s name and picture appear at the top of the candidate record, and that the review score fields be made into radio buttons instead of the Number field. Can this be done with Visualforce? Comment · Unlike · Share · Yesterday at 3:04 PM

381

N

AL

U

SE

O N

LY

Developer I can make these changes using Visualforce. I’ll get right on it. Like · Today at 8:26 AM

TE R

Visualforce Page Structure

IN



pageBlock

pageblockButtons

inputField pageBlockSection 382

© Copyright 2013 salesforce.com, inc.

191

Application Essentials

18-6: Create the Candidate Page 20 min

Goal:

Your Turn

Create the candidate Visualforce page. Scenario: Universal Containers would like the name and picture of the candidate to display at the top of the candidate page. Task: 1. Create the candidate page.

3. Complete the page.

O N

4. Override the standard candidate page.

LY

2. Add the needed components to display the candidate's name and picture.

383

N

AL

U

SE

5. Test the new page.

15 min

Goal: Create a Visualforce page for the Review object that displays the score fields as radio buttons. Scenario: Universal Containers would like the Review object's Edit page to provide more guidance about what score should be entered. They would like the score fields to be replaced with radio buttons. Task: 1. Create the review page. 2. Add the components to display the Save and Cancel buttons. 3. Add the components to display the fields in the information section. 4. Add the needed components to display radio buttons for the score fields. 5. Override the review edit page. 6. Test the new page.

IN

Your Turn

TE R

18-7: Create the Review Page (Optional)

384

© Copyright 2013 salesforce.com, inc.

192

Application Essentials

Module Agenda  What is Visualforce?  Creating a Visualforce page  Parts of a Visualforce page  Templates in Visualforce

385

AL

U

SE

O N

LY

 Visualforce design recommendations

N

Engineering Change Request

IN

Assigned to:

TE R

Story

ECR

ECR Number

Due in

ECR_000003 5 days

Priority

Notes:

Create the page as a template so it can be used with other objects.

Design a new Job Application page that meets the following requirements:  Displays the Candidate and Position records in addition to the Job Application record  Allows the user to edit all three objects from the page  Adds a Confidential graphic to the top of the page There are a few other groups that want something similar. Create the page as a template so it can be used with other objects.

Ben Stuart SW Dev Manager

© Copyright 2013 salesforce.com, inc.

193

Application Essentials

Templates in Visualforce Page

SE

O N

LY

Template

N

AL

U

387

TE R

How to Create a Template

IN



Header

LeftNav

Main

Social

Use the name attribute to assign a name to all areas where content can be added. This name is referenced on the page. 388

© Copyright 2013 salesforce.com, inc.

194

Application Essentials

How to Use a Template

O N

LY



389

AL

U

SE

The value of the name attribute must match the name defined in the template exactly.

25 min

Goal:

Create a console page made up of a Visualforce template and a Visualforce page to replace the Job Application page.

IN

Your Turn

TE R

N

18-8: Create the Console Page Template and Job Application Console Page

Scenario: The Universal Containers recruiting team would like a console page that pulls in information from Job Application, Position, and Candidate. Instead of building a one-off Job Application console page, a template should be built so it can be used for several different console pages. Tasks: 1.

Create the custom console template page.

2.

Create the Job Application console page.

3.

Override the Job Application view to use the new console page.

4.

Give the recruiting team access to the new console page.

5.

Test the new functionality. 390

© Copyright 2013 salesforce.com, inc.

195

Application Essentials

What are static resources? Uploaded content that can be referenced in a Visualforce page.

 Images  Flash  Style sheets  JavaScript  PDFs

391

N

AL

U

SE

O N

LY

 Collection of related files in a directory hierarchy (.zip, .jar).

TE R

How to Add Static Resources

IN

Setup | Develop | Static Resources

There is a 5 MB limit per file and a 250 MB overall limit for static resources. 392

© Copyright 2013 salesforce.com, inc.

196

Application Essentials

How to Add Resources to a Page Referenced using the $Resource global variable:

Include other technologies using: 

393

AL

U

SE

O N

LY



10 min

Goal:

Add the Confidential graphic to the Job Application console page.

IN

Your Turn

TE R

N

18-9: Add the Confidential Image to the Job Application Console

Scenario: The Universal Containers recruiting team wants to highlight that the job application information is confidential. They would like the Confidential graphic to display on the console page. Tasks: 1. Upload the Confidential graphic as a static resource. 2. Add the image to the console page.

394

© Copyright 2013 salesforce.com, inc.

197

Application Essentials

Module Agenda  What is Visualforce?  Creating a Visualforce page  Parts of a Visualforce page  Templates in Visualforce

395

N

AL

U

SE

O N

LY

 Visualforce design recommendations

TE R

Visualforce Design Recommendations

IN

Use page layouts whenever possible.

Do Not:

– Design pages around specific tasks.

– Overload pages with functionality and data

 Do:

– Use static resources to serve images, CSS, JavaScript, and other non-changing files. – Optimize images for the Web. .

396

© Copyright 2013 salesforce.com, inc.

198

Application Essentials

Module Review 1. What kind of content can be included in a Visualforce page? 2. What are controllers? Where are they referenced in the page? 3. What are components? 4. What does Development mode enable?

397

TE R

N

AL

U

SE

O N

LY

5. What is the purpose of attributes in components?

IN

Module 19: Additional Uses for Visualforce

398

© Copyright 2013 salesforce.com, inc.

199

Application Essentials

Story

User Interface Meeting  The new Job Application console has impressed a lot of people.

Cynthia Capobianco CEO

Megan Smith VP Human Resources

User Interface Meeting

TE R

Story

N

AL

U

SE

Ben Stuart SW Dev Manager

O N

LY

 You have been invited to a meeting to go over other interface changes that people would like made.

IN

Can we change the look of the Job Application page so it doesn’t look the same as the rest of Salesforce?

Megan Smith VP Human Resources

Ben Stuart SW Dev Manager

© Copyright 2013 salesforce.com, inc.

Yes, CSS can be used to change the look and feel of the page.

Cynthia Capobianco CEO

200

Application Essentials

Changing the Look and Feel of a Page with CSS  Use to define styles on the page. body {font-family: Arial Unicode MS;} h1 {color:red;}

 Use to reference a CSS style sheet uploaded as a static resource.

O N

LY



SE

Visualforce is not designed to fully re-brand a standard Salesforce application!

TE R

User Interface Meeting

IN

Story

N

AL

U

401

Is there any way to include the Employee Referral Web page that is being developed within the candidate list page?

Cynthia Capobianco CEO

Yes, Visualforce can be used to included websites or lists of records on the page.

Ben Stuart SW Dev Manager

© Copyright 2013 salesforce.com, inc.

Megan Smith VP Human Resources

201

Application Essentials

Including Web Content or Visualforce in a Visualforce Page To include Web content or other Visualforce pages use:  : insert Web content using a URL

403

N

AL

U

SE

O N

LY

 : insert another Visualforce page

TE R

Including Lists on a Visualforce Page To include a list of records on a Visualforce page use:

IN

 : displays a list of records

 recordSetVar="": the page is using a set oriented standard controller; value indicates the name of the set of records passed to the page

404

© Copyright 2013 salesforce.com, inc.

202

Application Essentials

19-1: Add Web Content to a Visualforce Page 15 min

Your Turn

Goal: Create a Visualforce page that displays a list of candidates and a website. Scenario: Universal Containers wants to display the Employee Referral page at the bottom of the candidate list view page, so employees can easily refer people to the company.

LY

The employee referral page is still under development, so just use www.salesforce.com as a placeholder and do not override the standard candidate page. Tasks:

405

N

AL

U

SE

2. Add a website to the page.

O N

1. Create a Visualforce page that displays the recent candidates.

15 min

Goal:

Create a page that lists a set of records that can be edited.

IN

Your Turn

TE R

19-2: Create a Mass Edit List Page (Optional)

Scenario: The Recruiting team would like a page that displays all the available positions where they can edit the status of multiple positions. Tasks: 1. Create a Visualforce page that displays a list of positions. 2. Add the Save and Cancel buttons . 3. Add the needed columns.

4. Test the page.

406

© Copyright 2013 salesforce.com, inc.

203

Application Essentials

Story

User Interface Meeting The Recruiting team is finding the candidate wizard really useful. Is there a way to make it the standard way to input a new candidate?

Megan Smith VP Human Resources

Cynthia Capobianco CEO

N

AL

U

SE

Ben Stuart SW Dev Manager

O N

LY

Yes, we can create a Visualforce page to deploy the flow and override the standard page with it.

TE R

Deploying a Flow with Visualforce  Use to display a flow.

IN



 The name attribute is used to reference the flow's unique name.

Users running a flow deployed on a Visualforce page must have access to the page and have the Run Flows system permission. 408

© Copyright 2013 salesforce.com, inc.

204

Application Essentials

19-3: Deploy a Flow using Visualforce 10 min

Goal:

Your Turn

Create a Visualforce page that displays the Candidate flow. Scenario: The Recruiting team wants to use the Candidate flow when inputting information for all new candidates. Tasks: 1. Create a Visualforce page that displays the Candidate flow.

LY

2. Override the standard New view on the Candidate object.

409

TE R

User Interface Meeting

IN

Story

N

AL

U

SE

O N

3. Modify the recruiting profile to give them access to the page.

With the job posting site records, it would be great if the site in the record could display on the record. Is this possible?

Megan Smith VP Human Resources

Ben Stuart SW Dev Manager

© Copyright 2013 salesforce.com, inc.

Yes, we can create a Visualforce page that displays the site and add it as a section in the page layout.

Cynthia Capobianco CEO

205

Application Essentials

Where Can Visualforce Be Used?  As a stand-alone page:

 As an embedded page:

– Replace existing Salesforce pages

– As sections of pages – Include in a dashboard

– Replace email templates

411

N

AL

U

SE

O N

LY

– Create new tools via tabs, links, or buttons

15 min

Goal:

Create a Visualforce page that displays the Job Posting site and add it to a page layout.

IN

Your Turn

TE R

19-4: Display the Job Site

Scenario: Universal Containers wants to display the website listed in the Job Posting site record below the record details. Tasks: 1. Create a Visualforce page that displays the website based on the information in the record 2. Insert the page into the Job Posting site page layout.

412

© Copyright 2013 salesforce.com, inc.

206

Application Essentials

Story

User Interface Meeting Right now there are some fields in the Position record that only display if the position is a technical position. Would there be a way to show those fields based on the selected department?

Megan Smith VP Human Resources

Cynthia Capobianco CEO

N

AL

U

SE

Ben Stuart SW Dev Manager

O N

LY

Yes, but it may require programming beyond Visualforce (JavaScript and Ajax).

TE R

Visualforce and Ajax

IN

Ajax behaviors are asynchronous events that occur in the background while a user continues to work.

Visualforce provides some Ajax behaviors so complex JavaScript logic is not required. {!contact.Name}

These can be used to:  Implement partial page updates.  Provide status for asynchronous operations.  Apply Ajax behavior to events on any component.

414

© Copyright 2013 salesforce.com, inc.

207

Application Essentials

Including JavaScript To include JavaScript:  Upload the JavaScript function as a static resource and call the function using the includeScript component:

or  Create a reusable JavaScript function within tags.

O N

LY

function changeFont(input, textid) { if(input.checked) document.getElementById(textid).style.fontWeight = "bold"; else document.getElementById(textid).style.fontWeight = "normal"; }

415

N

AL

U

SE

For better performance, upload the functions as a static resource.

TE R

Visualforce and JavaScript Use JavaScript to get access to a wide range of existing JavaScript functionality.

IN

function changeFont(input, textid) { if(input.checked) document.getElementById(textid).style.fontWeight = "bold"; else document.getElementById(textid).style.fontWeight = "normal"; } . . . Click to change the text: Change me!

Before writing any JavaScript, make sure there is not an existing Visualforce component that could be used. 416

© Copyright 2013 salesforce.com, inc.

208

Application Essentials

JavaScript Events Many Visualforce components support JavaScript event attributes. apex:selectOption

Attribute Name

Description

onclick

The JavaScript invoked if the onclick event occurs--that is, if the user clicks the selectOption component.

Required

ondblclick

The JavaScript invoked if the onclick event occurs--that is, if the user clicks the selectOption component twice.

LY

apex:dataTable

Description

Required

onmousedown

The JavaScript invoked if the onmousedown event occurs—that is, if the user clicks a mouse button.

onmousemove

The JavaScript invoked if the onmousemove event occurs—that is, if the user moves the mouse pointer.

417

AL

U

SE

O N

Attribute Name

20 min

Goal:

Override the Position New page to display certain fields based on the values of others, and refresh only the part of the page that is required.

IN

Your Turn

TE R

N

19-5: Create a Partial Page Update for Conditional Fields (Optional)

Scenario: Universal Containers wants the fields specific to a technical position to appear only when the department is set to either Engineering or IT. Tasks: 1. Create a Visualforce page based on the Position page. 2. Add the partial page update to the page. 3. Override the Position New button. 4. Test the page. 418

© Copyright 2013 salesforce.com, inc.

209

Application Essentials

Story

User Interface Meeting Right now, the candidates fill in a paper job app and then the recruiter puts that information into Salesforce. Can we create a form on the website that adds the information to Salesforce?

Cynthia Capobianco CEO

O N

LY

Yes, Force.com Sites and Site.com can both do this.

Megan Smith VP Human Resources

N

AL

U

SE

Ben Stuart SW Dev Manager

TE R

What is Force.com Sites? Creates public websites using Visualforce that can include data and content from a Salesforce application. 1.

IN

To create a Force.com Site: Register the domain name with Force.com.

2.

Create the site in Salesforce.

3.

Design and create the pages using Visualforce.

4.

Set the security and make the pages visible on the site.

5.

Activate the site.

420

© Copyright 2013 salesforce.com, inc.

210

Application Essentials

What is Site.com?  Site.com is a Web content management system (CMS) that makes it easy to build, edit, and manage websites and Salesforce Communities.

O N

Add content from contributors or based on Salesforce data

Publish to a domain

421

N

AL

U

SE

Upload site assets

Design site/pages using Site.com Studio and standard Web technologies

LY

 Websites are built using Site.com Studio and standard Web technologies (CSS, HTML, JavaScript, etc.).

TE R

Force.com Sites vs. Site.com Site.com

 Can create websites that can display and create Salesforce data

 Can create websites that can display and create Salesforce data

 Built using Visualforce

 Built using Site.com Studio and standard Web technologies

 Register domain through Force.com

 Register domain through any domain registrar

 Websites housed in the cloud

 Websites housed in the cloud

 Can create both authenticated and unauthenticated websites

 Can create public (unauthenticated) websites and authenticated pages for Salesforce Communities

IN

Force.com Sites

422

© Copyright 2013 salesforce.com, inc.

211

Application Essentials

Story

User Interface Meeting What about mobile? Can the interviewers, hiring managers, and such access the Recruiting app and especially the Job Application console page on their mobile devices?

Ben Stuart SW Dev Manager

Megan Smith VP Human Resources

N

AL

U

SE

Cynthia Capobianco CEO

O N

LY

Maybe; there is limited support for Visualforce pages on Salesforce Classic or Touch.

TE R

Salesforce Classic

A client application that allows access to Salesforce from BlackBerry, iPhone, and Android devices.

IN

Supported on:

 BlackBerry operating system versions 4.3 through 7.0.  iPhone 3G/4/4S/5  iPad/iPad 2/iPad with Retina Display (with iPhone application in compatibility mode)  Android handsets and tablets running OS versions 2.2, 2.3, 3.x.x, 4.0.x, or 4.1.x.

424

© Copyright 2013 salesforce.com, inc.

212

Application Essentials

Visualforce and Salesforce Classic Visualforce tabs are supported Any tabs and pages must be integrated into the mobile application. To do this: 1. Create a Visualforce tab optimized for mobile 2. Select the Mobile Ready checkbox

425

N

AL

U

SE

O N

LY

3. Add the Visualforce tab to a mobile configuration

IN

TE R

Salesforce Touch

A version of Salesforce designed specifically for touchscreen mobile devices. Supported on:  iPad 2 or later  iPad Mini  iPhone 4 or later (with iOS 6.0 or higher) Accessible via:  iPad Web browser  App from the iTunes App Store or AppExchange

 Visualforce tabs are supported. 426

© Copyright 2013 salesforce.com, inc.

213

Application Essentials

Module Review 1. Where can Visualforce be used on a page layout? 2. Where should a CSS file be uploaded for use on a Visualforce page? 3. Name one difference between Force.com Sites and Site.com.

4. Can iframes be used in Visualforce pages? 5. Name two methods through which a JavaScript function can be placed in a Visualforce page.

427

N

AL

U

SE

O N

LY

6. What type of Visualforce pages are supported on mobile devices?

TE R

Thank You for Attending! Next steps:

IN

Your satisfaction is very important to us. Click on the Course Survey link located on the Home Page of your training org to give us your feedback.

Get certified! Go to www.webassessor.com/salesforce to register. Take the next step! Register for the next course! Go to www.salesforce.com/training.

428

© Copyright 2013 salesforce.com, inc.

214

Application Essentials

Training & Certification Resources Training Webpage:

www.salesforce.com/training Certification Webpage:

certification.salesforce.com

LY

Follow us on Twitter:

Salesforce Success Community:

O N

@SalesforceCert

IN

TE R

N

AL

U

SE

Log in to Salesforce  Help & Training  Collaboration

© Copyright 2013 salesforce.com, inc.

215

Application Essentials

LY

SE

O N

Building Applications with Force.com

IN

TE R

N

AL

U

Exercise Guide

LY O N SE U AL N TE R IN ©Copyright 2013 salesforce.com, inc. All rights reserved.

Table of Contents 3-1: Create Custom Objects ....................................................................................................... 1 3-2: Create Custom Fields ......................................................................................................... 3 3-3: Create Lookup Relationships .............................................................................................. 8 3-4: Create Master-Detail Relationships ....................................................................................10 3-5: Create a Custom Junction Object ......................................................................................12 3-6: Create a Lookup Filter .......................................................................................................14 4-1: Create a Custom Application..............................................................................................15 4-2: Create Custom Tabs ..........................................................................................................17

LY

4-3: Customize Page Layouts ...................................................................................................19 5-1: Create Formula Fields........................................................................................................22

O N

5-2: Create Cross-Object Formulas...........................................................................................24 5-3: Create Roll-Up Summary Fields.........................................................................................26

SE

8-1: Create Custom Profiles ......................................................................................................28 8-2: Create Permission Sets .....................................................................................................30

U

8-3: Change Access Using Field-Level Security ........................................................................33 8-4: Create Record Types .........................................................................................................34

AL

8-5: Create Page Layouts .........................................................................................................36 8-6: Create Page Layouts and Record Types ...........................................................................38

N

9-1: Create Custom Object Queues ..........................................................................................40

TE R

9-2: Set Organization-Wide Defaults .........................................................................................41 9-3: Set Organization-Wide Defaults .........................................................................................42 9-4: Implement a Role Hierarchy ...............................................................................................44

IN

9-5: Create a Public Group........................................................................................................46 9-6: Implement Manual Sharing ................................................................................................47 9-7: Implement Sharing Rules ...................................................................................................49 9-8: Create Apex Sharing Reasons ...........................................................................................51 10-1: Establish Data Access .....................................................................................................52 10-2: Restrict Data Access ........................................................................................................53 11-1: Create Formula Fields to Display Images.........................................................................56 11-2: Create Formula Fields to Display Hyperlinks ....................................................................58 12-1: Create Validation Rules ...................................................................................................60 12-2: Build Validation Rules to Enforce Conditionally Required Fields ......................................62 12-3: Build Validation Rules to Enforce Data Format.................................................................64 12-4: Build Validation Rules to Enforce Consistency .................................................................65 ©Copyright 2013 salesforce.com, inc. All rights reserved.

12-5: Create Validation Rules to Prevent Data Loss (Optional) .................................................68 13-1: Create Workflow Rules ....................................................................................................70 13-2: Set Up Time-Dependent Workflow ...................................................................................73 13-3: Set Up Time-Dependent Workflow (Optional) ..................................................................75 14-1: Create Multi-Step Approval Processes .............................................................................78 14-2: Create Approval Processes that Skip Steps .....................................................................84 14-3: Create Parallel Approval Processes .................................................................................88 14-4: Create Outbound Messages ............................................................................................92 14-5: Create Dynamic Approval Processes (Optional) ..............................................................94

LY

15-1: Create a Flow ................................................................................................................100 15-2: Create a New Version of a Flow .....................................................................................104

O N

15-3: Deploy a Flow ................................................................................................................108 16-1: Audit Changes Using Setup Audit Trail ..........................................................................110

SE

16-2: Audit Changes to Data ...................................................................................................111 17-1: Mass Transfer Ownership of Records ............................................................................112

U

17-2: Upload Positions ............................................................................................................113 17-3: Upsert Candidates .........................................................................................................116

AL

17-4: Upsert Remaining Object Data (Optional) ......................................................................118 18-1: Which is Best Solved Using Visualforce? .......................................................................119

N

18-2: Create a Visualforce Page .............................................................................................121

TE R

18-3: Use a Standard Controller and Override a Standard Page .............................................123 18-4: Find Components and Their Attributes ...........................................................................125 18-5: Complete the Offer Quick Edit Page ..............................................................................127

IN

18-6: Create the Candidate Page ............................................................................................129 18-7: Create the Review Page (Optional) ................................................................................131 18-8: Create the Console Page Template and Job Application Console Page ........................134 18-9: Add the Confidential Image to the Job Application Console ...........................................137 19-1: Add Web Content to a Visualforce Page ........................................................................138 19-2: Create a Mass Edit List Page (Optional) ........................................................................139 19-3: Deploy a Flow using Visualforce ....................................................................................140 19-4: Display the Job Site .......................................................................................................141 19-5: Create a Partial Page Update for Conditional Fields (Optional) ......................................143

©Copyright 2013 salesforce.com, inc. All rights reserved.

3-1: Create Custom Objects Goal: Create a custom object called Position. Scenario: Universal Containers (UC) is currently using a spreadsheet to track new positions. This very inefficient process is difficult to manage. In order to improve this process and make it more efficient, UC has decided to create a custom object to track positions. All internal communication and activity relating to Positions should be tracked on this object. In addition, users should be able to run reports on these objects.

LY

Task: Create a custom Position object.

O N

Time:

1. Create a Position custom object.

AL

A. Click Setup | Create | Objects. B. Click New Custom Object.

U

Instructions:

SE

5 minutes

IN

TE R

N

i. Label: Position ii. Plural Label: Positions iii. Object Name: Position (This field auto-populates.) iv. Record Name: Title v. Data Type: Text vi. Allow Reports: (selected) vii. Allow Activities: (selected) viii. Track Field History: (selected) ix. Deployment Status: Deployed x. Add Notes & Attachments related list to default page layout: (selected) xi. Launch New Custom Tab Wizard after saving this custom object: (cleared) C. Click Save.

©Copyright 2013 salesforce.com, inc. All rights reserved. Building Applications with Force.com – Exercise Guide – Page 1 of 144

Review 1. What database object is similar in concept to a custom object? _________________________________________________________________________ _________________________________________________________________________ _________________________________________________________________________ 2. What further advantages does a Salesforce object provide? _________________________________________________________________________ _________________________________________________________________________

LY

_________________________________________________________________________ 3. Where in the application is the plural label used?

O N

_________________________________________________________________________ _________________________________________________________________________

IN

TE R

N

AL

U

SE

_________________________________________________________________________

©Copyright 2013 salesforce.com, inc. All rights reserved. Building Applications with Force.com – Exercise Guide – Page 2 of 144

3-2: Create Custom Fields Goal: Add custom fields to the Position and Candidate custom objects. Scenario: With a new custom object created, Universal Containers has to create the fields it wants to use to track data regarding positions. There are varieties of different data types that will be required and certain fields will be dependent on others. You can use custom fields to set this up. Tasks:

LY

1. Add custom fields to the Position and Candidate objects. 2. Create dependent picklists. 3. Add a field for the Social Security Number on the Candidate object.

O N

Time:

Instructions: 1. Add custom fields to the Position object.

Click Setup | Create | Objects | Position. In the Custom Fields & Relationships related list, click New. Follow the steps to create the custom fields listed in the table below. Set all fields visible for the Custom-HR, Custom-Executive, and System Administrator profiles and click Next. E. Accept the default to add the field to the Position Layout and click Save. F. Click Save & New to create the next field in the list.

TE R

N

AL

U

A. B. C. D.

SE

20 minutes

Custom Field Label

IN

Custom Field Type Date/Time

Date Closed

Date/Time

Date Opened

Picklist

Picklist

Picklist Values/Notes

Status

New Open Closed

Sub-Status

Pending Approved Not Approved Filled Cancelled

©Copyright 2013 salesforce.com, inc. All rights reserved. Building Applications with Force.com – Exercise Guide – Page 3 of 144

Custom Field Label

Picklist Values/Notes

Department

Engineering IT Finance Support Sales

Picklist

Location

San Francisco, CA New York, NY Atlanta, GA London, United Kingdom

Number

Duration

Text Area

Job Description

Decimal Places: 0

SE

Legacy Position Number

U

Text

Max Pay

AL

Currency

Required: selected

Length: 20, Unique: selected (case insensitive), External ID: selected Length: 7, Decimal Places: 0

Min Pay

Length: 7, Decimal Places: 0

Picklist

Priority

Critical High Medium Low

Text Area (Long)

Education

Text Area (Long)

Skills Required

Text Area (Long)

Responsibilities

Date

Start Date

Picklist

Type

IN

TE R

N

Currency

Length: 3,

O N

Picklist

LY

Custom Field Type

Full Time Part Time Temp

©Copyright 2013 salesforce.com, inc. All rights reserved. Building Applications with Force.com – Exercise Guide – Page 4 of 144

Custom Field Type

Custom Field Label

Pay Grade

ENG-100 ENG-200 ENG-300 ENG-400 S-100 S-200 S-300 S-400

O N

2. Create dependent picklists.

SE

In the Custom Fields & Relationships related list, click Field Dependencies. Click New. Controlling Field: Department Dependent Field: Pay Grade Click Continue. Edit the Field Dependencies based on the chart below.

U

A. B. C. D. E. F.

C-100 C-200 C-300 C-400 IT-100 IT-200 IT-300 IT-400 ACT-100 ACT-200 ACT-300 ACT-400

LY

Picklist

Picklist Values/Notes

Finance

Engineering

Support

N

IT

TE R

Sales

AL

Note: To create dependencies, highlight the values in each column that should be available when a user selects that value, then click Include Values. You can use SHIFT and CTRL to select more than one value at a time.

IT-100

ACT-100

ENG-100

S-100

C-200

IT-200

ACT-200

ENG-200

S-200

C-300

IT-300

ACT-300

ENG-300

S-300

C-400

IT-400

ACT-400

ENG-400

S-400

IN

C-100

G. Click Save. H. Click New. i. Controlling Field: Status ii. Dependent Field: Sub-Status I. Click Continue. J. Edit the Field Dependencies as instructed in Step 2, F. i. Open: Pending, Approved ii. Closed: Not Approved, Filled, Cancelled iii. New: (none selected) K. Click Include Values. ©Copyright 2013 salesforce.com, inc. All rights reserved. Building Applications with Force.com – Exercise Guide – Page 5 of 144

L. Click Save. M. When you receive a pop-up message that says, “1 controlling values have no dependent values included. Save anyway?” click OK. 3. Add a field for the Social Security Number on the Candidate object. A. Click Setup | Create | Objects | Candidate. B. Under the Custom Fields & Relationships related list, click New.

O N

LY

i. Data Type: Text (Encrypted) ii. Click Next. iii. Field Label: Social Security Number iv. Length: 11 v. Field Name: Social_Security_Number (This field auto-populates.) vi. Mask Type: Social Security Number vii. Mask Character: X viii. Click Next.

IN

TE R

N

AL

U

SE

C. Set the field visible for the Custom-HR, Custom-Executive, and System Administrator profiles and click Next. D. Accept the default to add the field to the Candidate Layout, click Save.

©Copyright 2013 salesforce.com, inc. All rights reserved. Building Applications with Force.com – Exercise Guide – Page 6 of 144

Review 1. Which field data types can be controlling fields for dependent picklists? _________________________________________________________________________ _________________________________________________________________________ _________________________________________________________________________ 2. True or False? Only custom fields can be made universally required. _________________________________________________________________________ _________________________________________________________________________

LY

_________________________________________________________________________ 3. Can changing the data type of an existing custom field lead to data loss?

O N

_________________________________________________________________________ _________________________________________________________________________

IN

TE R

N

AL

U

SE

_________________________________________________________________________

©Copyright 2013 salesforce.com, inc. All rights reserved. Building Applications with Force.com – Exercise Guide – Page 7 of 144

3-3: Create Lookup Relationships Goal: Create lookup relationships to connect objects to one another. Scenario: Universal Containers needs to be able to see which Job Applications are related to each Position. Additionally, the company needs to see which Hiring Managers are related to each Position. Tasks:

LY

1. Create a lookup relationship between Job Application and Position. 2. Create a lookup relationship between Position and Hiring Manager. Time:

O N

5 minutes

SE

Instructions:

1. Create a lookup relationship between Job Application and Position.

N

AL

Data Type: Lookup Relationship Click Next. Related to: Position Click Next. Field Label: Position Field Name: Position

TE R

i. ii. iii. iv. v. vi.

U

A. Click Setup | Create | Objects | Job Application. B. In the Custom Fields & Relationships related list, click New.

IN

C. Click Next. D. Set the field visible for the Custom-HR, Custom-Executive, and System Administrator profiles and click Next. E. To accept the defaults to add the reference field to Page Layouts, click Next. F. To accept the defaults to add Custom Related Lists, click Save. 2. Create a lookup relationship between Position and Hiring Manager. A. Click Setup | Create | Objects | Position. B. In the Custom Fields & Relationships related list, click New. i. ii. iii. iv. v. vi. vii.

Data Type: Lookup Relationship Click Next. Related to: User Click Next. Field Label: Hiring Manager Field Name: Hiring_Manager (This field auto-populates.) Click Next.

©Copyright 2013 salesforce.com, inc. All rights reserved. Building Applications with Force.com – Exercise Guide – Page 8 of 144

IN

TE R

N

AL

U

SE

O N

LY

C. Set the field visible for the Custom-HR, Custom-Executive, and System Administrator profiles and click Next. D. To accept the defaults to add the reference field to Page Layouts, click Save.

©Copyright 2013 salesforce.com, inc. All rights reserved. Building Applications with Force.com – Exercise Guide – Page 9 of 144

3-4: Create Master-Detail Relationships Goal: Create master-detail relationships between two objects. Scenario: At Universal Containers (UC), every position should have one or more interviewers associated with it. An Interviewer record should always be associated with a Position record. If a given position is deleted, then the associated interviewer data should also be deleted. To satisfy these requirements, UC needs to create a master-detail relationship between the Interviewer object and the Position object.

LY

In addition, job application records and review records should have a similar relationship. Tasks:

O N

1. Create a master-detail relationship between Interviewer and Position. 2. Create a master-detail relationship between Job Application and Review. Time:

SE

5 minutes

U

Instructions:

AL

1. Create a master-detail relationship between Interviewer and Position.

TE R

Data Type: Master-Detail Relationship Click Next. Related to: Position Click Next. Field Label: Position (This field auto-populates.) Field Name: Position (Click field to auto-populate.) Click Next.

IN

i. ii. iii. iv. v. vi. vii.

N

A. Click Setup | Create | Objects | Interviewer. B. In the Custom Fields & Relationships related list, click New.

C. To accept the defaults for field-level security, click Next. D. To accept the defaults to add the field to the page layout, click Next. E. To accept the defaults to add the related list to the page layout, click Save. 2. Create a master-detail relationship between Job Application and Review. A. Click Setup | Create | Objects | Review. B. In the Custom Fields & Relationships related list, click New. i. ii. iii. iv. v.

Data Type: Master-Detail Relationship Click Next. Related to: Job Application Click Next. Field Label: Job Application ©Copyright 2013 salesforce.com, inc. All rights reserved. Building Applications with Force.com – Exercise Guide – Page 10 of 144

vi. Field Name: Job_Application (This field auto-populates.) vii. Click Next. C. To accept the defaults for field-level security, click Next. D. To accept the defaults to add the field to the page layout, click Next. E. To accept the defaults to add the related list to the page layout, click Save. Review 1. How is the wizard for creating a lookup relationship different from creating a master-detail relationship?

LY

_________________________________________________________________________ _________________________________________________________________________

IN

TE R

N

AL

U

SE

O N

_________________________________________________________________________

©Copyright 2013 salesforce.com, inc. All rights reserved. Building Applications with Force.com – Exercise Guide – Page 11 of 144

3-5: Create a Custom Junction Object Goal: Create a Many-to-Many Relationship between Position and Job Posting Site. Scenario: Universal Containers will have many positions advertised on various job posting sites. The company wants to be able to connect and manage those records within Salesforce. 1. Create a new custom junction object. 2. Create the master-detail relationships of Job Posting with Position and Job Posting Site.

O N

Time:

LY

Tasks:

1. Create a new custom junction object.

AL

A. Click Setup | Create | Objects. B. Click New Custom Object.

U

Instructions:

SE

5 minutes

IN

TE R

N

i. Label: Job Posting ii. Plural Label: Job Postings iii. Object Name: Job_Posting (This field auto-populates.) iv. Record Name: Job Posting Number v. Data Type: Auto Number vi. Display Format: JOBPOST-{0000} vii. Starting Number: 1 viii. Allow Reports: (selected) ix. Allow Activities: (cleared) x. Track Field History: (selected) xi. Deployment Status: Deployed xii. Add Notes & Attachments related list to default page layout: (selected) xiii. Launch New Custom Tab Wizard after saving this custom object: (cleared) C. Click Save. 2. Create the master-detail relationships of Job Posting with Job Posting Site and Position. A. In the Custom Fields & Relationships related list, click New. i. ii. iii. iv.

Data Type: Master-Detail Relationship Click Next. Related to: Job Posting Site Click Next. ©Copyright 2013 salesforce.com, inc. All rights reserved. Building Applications with Force.com – Exercise Guide – Page 12 of 144

v. Field Label: Job Posting Site vi. Field Name: Job_Posting_Site (This field auto-populates.) vii. Click Next.

i. ii. iii. iv. v. vi. vii.

Data Type: Master-Detail Relationship Click Next. Related to: Position Click Next. Field Label: Position Field Name: Position (This field auto-populates.) Click Next.

LY

B. To accept the defaults for field-level security, click Next. C. To accept the defaults to add reference field to Page Layouts, click Next. D. To accept the defaults to add the related list to the page layout, click Save & New.

IN

TE R

N

AL

U

SE

O N

E. To accept the defaults for field-level security, click Next. F. To accept the defaults to add reference field to Page Layouts, click Next. G. To accept the defaults to add the related list to the page layout, click Save.

©Copyright 2013 salesforce.com, inc. All rights reserved. Building Applications with Force.com – Exercise Guide – Page 13 of 144

3-6: Create a Lookup Filter Goal: Create a lookup filter. Scenario: At Universal Containers (UC), only users who are people managers should be selected as the hiring manager on a new position. UC needs to create a lookup filter that would prevent users from selecting a user who is not a hiring manager when creating a new position. Task: Create a lookup filter.

LY

Time:

O N

5 minutes

Instructions:

U

Click Setup | Create | Objects | Position. Scroll down to the Custom Fields & Relationships section and click Hiring Manager. Click Edit. Under the Lookup Filter section, click the Show Filter Settings link.

AL

A. B. C. D.

SE

1. Create a lookup filter.

i. ii. iii. iv. v. vi.

IN

TE R

N

Field: Hiring Manager: People Manager? Operator: equals Value/Field: Value Value: True Filter Type: Required If it doesn’t, display this error message on save: In order to be a Hiring Manager, the user must be a people manager. Please ensure that the People Manager? checkbox on the user record is checked. vii. Active: (selected)

E. Click Save.

©Copyright 2013 salesforce.com, inc. All rights reserved. Building Applications with Force.com – Exercise Guide – Page 14 of 144

4-1: Create a Custom Application Goal: Create a custom recruiting application. Scenario: Now that Universal Containers has created several new objects and populated them with fields, the company needs to store them in one logical, easy to access location. Task: Create a custom recruiting application. Time:

O N

LY

5 minutes

Instructions: A. Click Setup | Create | Apps. B. Click New.

SE

1. Create a custom recruiting application.

C. Click Next. D. Click Insert an Image.

AL

U

i. App Label: Recruiting ii. App Name: Recruiting (This field auto-populates.)

TE R

N

i. File Location: Corporate Graphics ii. Click the link for the Universal containers.GIF file.

IN

E. Click Next. F. Hold CTRL and select Reports, Documents, Dashboards, Offers, Candidates, Job Applications, Reviews, Job Posting Sites, and Interviewers from the Available Tabs list. i. Click Add to move selected items to the Selected Tabs list. ii. Set the Default Landing Tab to Home. G. Click Next. H. Make the app visible to the Custom-HR, Custom-Executive, and System Administrator profiles by checking the Visible checkbox on the correct profiles. I. Click Save.

©Copyright 2013 salesforce.com, inc. All rights reserved. Building Applications with Force.com – Exercise Guide – Page 15 of 144

Review 1. How do you switch applications as a user in the Salesforce user interface? _________________________________________________________________________ _________________________________________________________________________ _________________________________________________________________________ 2. Can a Salesforce object exist independent of an application? _________________________________________________________________________

LY

_________________________________________________________________________

IN

TE R

N

AL

U

SE

O N

_________________________________________________________________________

©Copyright 2013 salesforce.com, inc. All rights reserved. Building Applications with Force.com – Exercise Guide – Page 16 of 144

4-2: Create Custom Tabs Goal: Create a custom tabs for the Positions and Job Postings objects. Scenario: Universal Containers wants to make sure that users will be able to easily access the new custom objects it has created. The company needs to create new custom tabs that will quickly guide people to this information. Tasks:

LY

1. Create a custom tab for the Positions object. 2. Create a custom tab for the Job Postings object. 3. Reorder the tabs for your user account.

O N

Time: 5 minutes

SE

Instructions:

1. Create a custom tab for the Positions object.

AL

U

A. Click Setup | Create | Tabs. B. In the Custom Object Tabs section, click New. C. Enter the following details:

TE R

N

i. Object: Position ii. Tab Style: Desk iii. Splash Page Custom Link: (leave as --None--) D. Click Next. E. Add to Profiles.

Select the Apply one tab visibility to all profiles: Default Off radio button. ii. Select the Apply a different tab visibility for each profile radio button. iii. Select Default On for the Custom-Executive, Custom-HR, and System Admin profiles. iv. Click Next.

IN

i.

F. Add to Custom Apps. i. Deselect all applications except the Recruiting application. ii. Select the Append tab to users’ existing personal customizations checkbox. iii. Click Save. 2. Create a custom tab for the Job Postings object. A. In the Custom Object Tabs section, click New. ©Copyright 2013 salesforce.com, inc. All rights reserved. Building Applications with Force.com – Exercise Guide – Page 17 of 144

B. Enter the following details: i. Object: Job Posting ii. Tab Style: Building Block iii. Splash Page Custom Link: (leave as --None--) C. Click Next. D. Add to Profiles. Select the Apply one tab visibility to all profiles: Default Off radio button. ii. Select the Apply a different tab visibility for each profile radio button. iii. Select Default On for the Custom-Executive, Custom-HR, and System Admin profiles.

LY

i.

O N

E. Add to Custom Apps.

3. Reorder the tabs for your user account.

SE

i. Deselect all applications except the Recruiting application. ii. Select the Append tab to users’ existing personal customizations checkbox. iii. Click Save.

N

AL

U

A. Select the Recruiting app from the Force.com App Menu in the upper right-hand corner. B. Click All Tabs (+). C. Click Customize My Tabs. D. Make the Positions tab appear just to the right of the Home tab.

TE R

i. Click Positions under Selected Tabs. ii. Use the Up arrow to move it to just under the Home tab. Note: Moving a tab up in the list moves it farther to the left in the Salesforce user interface. Moving a tab down in the list moves it farther to the right.

IN

iii. Click Save.

©Copyright 2013 salesforce.com, inc. All rights reserved. Building Applications with Force.com – Exercise Guide – Page 18 of 144

4-3: Customize Page Layouts Goal: Create a page layout for the Position object. Scenario: Universal Containers wants to make sure that the newly created fields are displayed in a logical order on the page. The fields should be arranged according to the chart below.

Section Name

Fields Title

Owner

LY

Information

Department Location

Priority

O N

Type

Status

Sub-Status Date Opened

Hiring Manager

Date Closed

U

SE

Pay Grade

Duration

Start Date

IN

N

Job Description Education

TE R

Description

AL

Legacy Position Number

Responsibilities Skills Required

Compensation

Min Pay

Max Pay

System Information

Created By

Last Modified By

Tasks: 1. 2. 3. 4.

Arrange existing fields in the Position Page Layout. Create a new section and add fields for Description on the Position Page Layout. Create a new section and add fields for Compensation on the Position Page Layout. Set the Status field to be required and add Position History to the Related Lists area.

Time: 10 minutes

©Copyright 2013 salesforce.com, inc. All rights reserved. Building Applications with Force.com – Exercise Guide – Page 19 of 144

Instructions: 1. Arrange the fields within the sections as noted in the table. A. Click Setup | Create | Objects | Position. B. In the Page Layouts related list, click the Edit link next to the Position Layout. C. Arrange the fields in the Information section according to the chart. Section Name

Fields Title

Owner

Type

Priority

Department

Status

Location

Sub-Status

LY

Information

Date Opened

O N

Pay Grade Hiring Manager

Date Closed

Duration

Start Date

SE

Legacy Position Number 2. Create a new section for Description.

AL

i. Section Name: Description ii. Layout: 1-Column iii. Click OK.

U

A. Drag Section from the palette to below the Information section.

Section Name

Fields

Description

Job Description

IN

TE R

N

B. Drag the Job Description, Education, Responsibilities, and Skills Required fields from the Information section into the Description section according to the chart.

Education Responsibilities Skills Required

3. Create a new section for Compensation. A. Drag Section from the palette to below the Description section. i. ii. iii. iv.

Section Name: Compensation Layout: 2-Column Tab Order: Top-Down Click OK.

©Copyright 2013 salesforce.com, inc. All rights reserved. Building Applications with Force.com – Exercise Guide – Page 20 of 144

B. Drag the Min Pay and Max Pay fields into the Compensation section according to the chart. Section Name

Fields

Compensation Min Pay Max Pay 4. Set the Status field to be required and add Position History to the Related Lists area. A. Double-click the Status field and select the Required checkbox. B. Click OK. C. Add Position History to the Related Lists area.

LY

i. On the palette, click Related Lists. ii. Click and drag Position History to the bottom of the Related Lists area. iii. Click Save.

O N

D. Test these changes by clicking the Positions tab in the Recruiting application and adding a new position.

SE

Review

1. What is the effect of setting the Status field to be required?

U

_________________________________________________________________________ _________________________________________________________________________

AL

_________________________________________________________________________

N

2. What might be reasons why you would want to have multiple page layouts for the same object?

TE R

_________________________________________________________________________ _________________________________________________________________________ _________________________________________________________________________

IN

3. What does the Tab Order control for each section on a page layout? _________________________________________________________________________ _________________________________________________________________________ _________________________________________________________________________

©Copyright 2013 salesforce.com, inc. All rights reserved. Building Applications with Force.com – Exercise Guide – Page 21 of 144

5-1: Create Formula Fields Goals: Create a Review formula field to calculate overall score. Create a Position Formula that tracks the number of days a position has been open. Scenario: The VP of HR at Universal Containers is interested in tracking the overall score of each candidate who has been interviewed, as well as the number of days that a position stays open. You need to create formula fields to accomplish these tasks. Tasks:

LY

1. Create a custom formula field that calculates the overall score from the Review object. 2. Create new records to test your formula. 3. Create a new custom formula field that calculates the Days Opened on the Position object.

O N

Time:

SE

10 minutes

Instructions:

i. ii. iii. iv.

TE R

N

AL

Click Setup | Create | Objects | Review. In the Custom Fields & Relationships related list, click New. In the Data Type field, click Formula. Click Next. Enter the following field details. Field Label: Overall Score Field Name: Overall_Score (This field auto-populates.) Formula Return Type: Number Decimal Places: 2

IN

A. B. C. D. E.

U

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

F. Click Next. G. Add the formula. i.

Overall Score (Number) =: ( Cultural_Fit__c + Experience__c + Leadership_Skills__c + IF( Recommend_for_Hire__c , 5, 1) ) / 4 ii. Click Check Syntax to verify the syntax. iii. Click Next. H. Set the field visible for the Custom-HR, Custom-Executive, and System Administrator profiles and click Next. I. Click Save to accept the defaults and add the field to the Page Layout. 2. Create new records to test your formula. A. Create a new candidate record. B. Create a new interviewer record, associating it with the position you created in an earlier exercise. ©Copyright 2013 salesforce.com, inc. All rights reserved. Building Applications with Force.com – Exercise Guide – Page 22 of 144

C. D. E. F. G.

Create a new job application record, specifying the candidate you created in step 2, A. Create a new review record. Specify the interviewer you created in step 2, B. Specify the job application you created in step 2, C. Fill out the fields for scores in Cultural Fit, Experience, and Leadership Skills (acceptable values are 1-5). H. After saving the review record, verify that your formula field was correctly updated on the review. 3. Create a new custom formula field that calculates the Days Opened on the Position object.

i. ii. iii. iv.

O N

LY

Click Setup | Create| Objects | Position. In the Custom Fields & Relationships related list, click New. In the Data Type field, select Formula. Click Next. Enter the following information: Field Label: Days Opened Field Name: Days_Opened (This field auto-populates.) Formula Return Type: Number Decimal Places: 0

SE

A. B. C. D. E.

U

F. Click Next. G. Add the formula. i.

N

AL

Days Opened (Number) =: IF( ISPICKVAL( Status__c , "Open") , NOW() - Date_Opened__c , Date_Closed__c - Date_Opened__c ) ii. Click Check Syntax to verify the syntax. iii. After verifying that there are no errors, click Next.

Review

IN

TE R

H. Set the field visible for the Custom-HR, Custom-Executive, and System Administrator profiles and click Next. I. Click Save to accept the defaults to add the field to the page layout. J. Click on the position record created earlier to verify that the number of days open is being calculated.

1. What happens to the displayed value of a formula field if the user does not have access to one of the fields used in the formula? _________________________________________________________________________ _________________________________________________________________________ _________________________________________________________________________

©Copyright 2013 salesforce.com, inc. All rights reserved. Building Applications with Force.com – Exercise Guide – Page 23 of 144

5-2: Create Cross-Object Formulas Goal: Use cross-object formula fields to make fields from related objects visible on an object. Scenario: Universal Containers users would like to see the candidate full name and position title on an offer. Tasks: 1. Create a formula field to pull the candidate full name to display on the offer. 2. Create a formula field to pull the position title to display on the offer.

LY

Time:

O N

5 minutes

Instructions:

SE

1. Create a formula field to pull the candidate full name to display on the offer.

U

A. Click Setup | Create| Objects | Offer. B. In the Custom Fields & Relationships section, click New.

AL

i. In the Data Type field, select Formula. ii. Click Next. C. Enter the following field details:

TE R

N

i. Field Label: Candidate Name ii. Field Name: Candidate_Name (This field auto-populates.) iii. Formula Return Type: Text

i.

IN

D. Click Next. E. Add the formula.

Candidate Name (Text) =: Job_Application__r.Candidate__r.First_Name__c &" "& Job_Application__r.Candidate__r.Last_Name__c ii. Click Check Syntax to verify the syntax. iii. After verifying that there are no errors, click Next.

F. Set the field visible for the Custom-HR, Custom-Executive, and System Administrator profiles and click Next. G. Click Save & New to accept the defaults on the Add to Layout page. 2. Create a formula field to pull the position title to display on the offer. A. In the Data Type field, enter Formula. B. Click Next. C. Enter the following field details: i. Field Label: Position Title ii. Field Name: Position_Title (This field auto-populates.) ©Copyright 2013 salesforce.com, inc. All rights reserved. Building Applications with Force.com – Exercise Guide – Page 24 of 144

iii. Formula Return Type: Text D. Click Next. E. Add the formula. i. Position Title (Text) =: Job_Application__r.Position__r.Name ii. Click Check Syntax to verify the syntax. iii. After verifying that there are no errors, click Next.

LY

F. Set the field visible for the Custom-HR, Custom-Executive, and System Administrator profiles and click Next. G. Click Save to accept the defaults on the Add to Layout page. H. Create a new offer record to view the new fields.

1. Which objects can be referenced by formula fields?

O N

Review

_________________________________________________________________________

SE

_________________________________________________________________________ _________________________________________________________________________

U

2. What is the limit for cross-object formulas’ unique relationships per object across all formulas and rules?

AL

_________________________________________________________________________ _________________________________________________________________________

IN

TE R

N

_________________________________________________________________________

©Copyright 2013 salesforce.com, inc. All rights reserved. Building Applications with Force.com – Exercise Guide – Page 25 of 144

5-3: Create Roll-Up Summary Fields Goal: Calculate the average of all review scores on a job application. Scenario: To ensure the company hires stand-out candidates, the HR Director of Universal Containers wants to see a list of the all of the combined review scores on each Job Application. Tasks:

LY

1. Create a roll-up summary field for Total Reviews on the Job Application object. 2. Create a roll-up summary field for Review Scores on the Job Application object. 3. Create a formula field that calculates the Average Review Score for a job application. Time:

O N

10 minutes

SE

Instructions:

1. Create a roll-up summary field for Total Reviews on the Job Application object.

U

A. Click Setup | Create | Objects | Job Application. B. In the Custom Fields & Relationships section, click New.

TE R

N

AL

i. Data Type: Roll-Up Summary ii. Click Next. iii. Field Label: Total Reviews iv. Field Name: Total_Reviews (This field auto-populates.) v. Click Next. vi. Summarized Object: Reviews vii. Select Roll-Up Type: Count viii. Filter Criteria: All records should be included in the calculation

IN

C. Click Next. D. Set the field visible for the Custom-HR, Custom-Executive, and System Administrator profiles and click Next. E. Click Save & New to accept the defaults and add to page layouts. 2. Create a roll-up summary field for Review Scores on the Job Application object. A. Continue from previous task. i. Data Type: Roll-Up Summary ii. Click Next. iii. Field Label: Total Review Score iv. Field Name: Total_Review_Score (This field auto-populates.) v. Click Next. vi. Summarized Object: Reviews vii. Roll-Up Type: Sum viii. Field to Aggregate: Overall Score ©Copyright 2013 salesforce.com, inc. All rights reserved. Building Applications with Force.com – Exercise Guide – Page 26 of 144

ix. Filter Criteria: All records should be included in the calculation B. Click Next. C. Set the field visible for the Custom-HR, Custom-Executive, and System Administrator profiles and click Next. D. Click Save & New to accept the defaults to add to page layouts. 3. Create a formula field that calculates the Average Review Score for a job application. A. Enter the following details of the new formula field:

LY

Data Type: Formula Click Next. Field Label: Average Review Score Field Name: Average_Review_Score (This field auto-populates.) Formula Return Type: Number Decimal Places: 2

O N

i. ii. iii. iv. v. vi.

B. Click Next. C. Add the formula: i.

U

SE

Average Review Score (Number) =: IF (Total_Reviews__c0, Total_Review_Score__c / Total_Reviews__c, 0) ii. Click Check Syntax to verify the syntax. iii. After verifying that there are no errors, click Next.

TE R

Review

N

AL

D. Set the field visible for the Custom-HR, Custom-Executive, and System Administrator profiles and click Next. E. Click Save to accept the defaults and add the field to the page layout.

1. Can you create roll-up summary fields based on lookup relationships? _________________________________________________________________________

IN

_________________________________________________________________________ _________________________________________________________________________ 2. Are roll-up summary fields the same as formula fields? _________________________________________________________________________ _________________________________________________________________________ _________________________________________________________________________

©Copyright 2013 salesforce.com, inc. All rights reserved. Building Applications with Force.com – Exercise Guide – Page 27 of 144

8-1: Create Custom Profiles Goal: Create a new profile for recruiters. Scenario: At Universal Containers (UC), recruiters need to be able to create, view, and modify any position, candidate, job application, or review that is in the system. To comply with state and federal public records laws, all recruitment-related information must be saved for several years. Consequently, recruiters should NOT have the ability to delete any records in the Recruiting Application. Enable the Enhanced Profile User Interface. Create a custom recruiter profile. Define the recruiter profile to accomplish the business requirements. Assign users to this new profile. Modify the existing profiles for the new objects.

O N

1. 2. 3. 4. 5.

LY

Tasks:

SE

Time:

U

15 minutes

AL

Instructions:

1. Enable the Enhanced Profile User Interface.

TE R

N

A. Click Setup | Customize | User Interface. B. Check Enable Enhanced Profile List Views and Enable Enhanced Profile User Interface and click Save. 2. Create a custom recruiter profile.

IN

A. Click Setup | Manage Users | Profiles. B. Click New Profile. i. Existing Profile: Custom - HR ii. Profile Name: Custom – Recruiter C. Click Save. (Click "No Thanks" on the popup box if it appears.) 3. Define the recruiter profile to accomplish the business requirements. A. Remove the ability to Read (as well as Create, Edit, and Delete) all standard objects except Documents. i. ii. iii. iv. v. vi.

Select Object Settings from the Profile Overview list. Click Accounts. Click Edit. Select Tab Hidden as the Tab Setting. Uncheck Read from the Object Permissions table. Click Save. ©Copyright 2013 salesforce.com, inc. All rights reserved. Building Applications with Force.com – Exercise Guide – Page 28 of 144

vii. Repeat these steps for the Contacts, Ideas, Leads, Opportunities, Price Books, Products, and Solution objects. B. Set the custom object permissions to Read, Create, and Edit access.

O N

Interviewers Job Applications Job Postings Job Posting Sites Offers Reviews

SE

     

LY

i. Select Positions from the Object picklist. ii. Click Edit. iii. Check Read, Create, and Edit from the Object Permissions table. iv. Click Save. v. Select Candidates from the Object picklist. vi. Click Edit. vii. Uncheck Delete from the Object Permissions table. viii. Click Save. ix. Repeat these steps for these objects:

4. Assign users to this new profile.

U

Click Setup | Manage Users | Users. Click the Edit link next to Mario Ruiz. Select Custom – Recruiter from the Profile picklist. Click Save.

AL

A. B. C. D.

N

5. Modify the existing profiles for the new objects.

TE R

A. Set the Position object for the Custom-Executive, Custom-HR, and System Administrator access: Profile

Object Access

Create, Read, Edit, Delete, and View All

Custom-HR

Create, Read, Edit, Delete

System Administrator

Create, Read, Edit, Delete, View All, and Modify All

IN

Custom-Executive

©Copyright 2013 salesforce.com, inc. All rights reserved. Building Applications with Force.com – Exercise Guide – Page 29 of 144

8-2: Create Permission Sets Goal: Create permission sets for the hiring manager and interviewers. Scenario: Hiring managers and interviewers have different needs and different levels of access to the information that will be stored in the Recruiting Application. In addition, the access of hiring managers and interviewers to other portions of the organization needs to be maintained. Tasks:

O N

LY

1. Create a new permission set for hiring managers. 2. Create a new permission set for interviewers. 3. Assign users to the new permission sets. Time:

SE

10 minutes

Instructions:

U

1. Create a new permission set for hiring managers.

IN

TE R

N

AL

A. Click Setup | Manage Users | Permission Sets. B. Click New. C. Type Hiring Managers as the Label, and click Save. (The other settings are correct as is. By leaving the license setting to None, this permission set can be used for any user regardless of their specific user license.) D. Click Assigned Apps. E. Click Edit. F. Select Recruiting from the Available Apps list and click Add. G. Click Save. H. Click Permission Set Overview and select Object Settings from the Overview list I. Click Candidates from the Object Settings list. J. Click Edit. K. Select Available from the Tab Settings list. L. Select Read from the Object Permissions list and click Save. M. Set the permissions for the Interviewers, Job Applications, Job Postings, Job Posting Sites, Offers, Positions, and Reviews objects by choosing the objects from the picklist, then clicking Edit, and selecting the following: Object

Read

Create

Edit

Delete

Tab Settings

Interviewers









Available

Job Applications









Available

Job Postings









Available

©Copyright 2013 salesforce.com, inc. All rights reserved. Building Applications with Force.com – Exercise Guide – Page 30 of 144

Object

Read

Create

Edit

Delete

Tab Settings

Job Posting Sites









Available

Offers









Available

Positions









Available

Reviews









Available

2. Create a new permission set for interviewers.

Object

Read

Create

Edit

Delete

Tab Settings

Interviewers

AL

U

SE

O N

LY

Click Setup | Manage Users | Permission Sets. Click New. Type Interviewers as the Label and click Save. All other settings are correct as is. Click Assigned Apps. Click Edit. Select Recruiting from the Available Apps list and click Add. Click Save. Click Object Settings. Click Candidates from the Object Settings list. Click Edit. Select Available from the Tab Settings list. Check Read from the Object Permissions list and click Save. Repeat these steps for the Interviewers, Job Applications, Job Postings, Job Posting Sites, Offers, Positions, and Reviews objects, setting the permissions to those listed below: 







Available









Available

Job Postings









Available

Job Posting Sites









Available

Offers









Available

Positions









Available

Reviews









Available

IN

TE R

Job Applications

N

A. B. C. D. E. F. G. H. I. J. K. L. M.

3. Assign users to the new permission sets. A. Click Setup | Manage Users | Users. B. Assign users to the Hiring Manager permission set. i. ii. iii. iv. v.

In the Full Name column, click Clark Kentman. In the Permission Set Assignments related list, click Edit Assignments. Select Hiring Managers from the Available Permission Sets list and click Add. Click Save. Repeat these steps for Frank Linstrom, Amy Lojack, Andy Macrola, and Ben Stuart.

C. Assign users to the Interviewer permission set.

©Copyright 2013 salesforce.com, inc. All rights reserved. Building Applications with Force.com – Exercise Guide – Page 31 of 144

TE R

N

AL

U

SE

O N

LY

In the Full Name column, click Craig Kingman. In the Permission Set Assignments related list, click Edit Assignments. Select Interviewers from the Available Permission Sets list and click Add. Click Save. Repeat these steps for Melissa Lee, Harry Potterham, Flash Stevenson, and Tom Zales.

IN

i. ii. iii. iv. v.

©Copyright 2013 salesforce.com, inc. All rights reserved. Building Applications with Force.com – Exercise Guide – Page 32 of 144

8-3: Change Access Using Field-Level Security Goal: Use field-level security to remove access to Social Security Numbers on candidate records. Scenario: In an effort to secure personal information on candidates, Universal Containers wants to ensure that recruiters cannot see or edit the Social Security Number of a candidate. Tasks: Modify the field-level security for candidates to hide the Social Security Number field for recruiters.

LY

Time:

O N

5 minutes

Instructions:

AL

U

Click Setup | Manage Users | Profiles | Custom – Recruiter. Click Object Settings from the Apps section. Click Candidates. Click Edit. Clear Read on the Social Security Number field in the Field Permissions section. Click Save. Log in as Mario Ruiz to test that the Social Security Number field is no longer visible.

N

A. B. C. D. E. F. G.

SE

1. Make the Social Security Number field hidden for recruiters.

IN

H. Log out.

TE R

i. Click Setup | Manage Users | Users. ii. Click the Login link next to Mario Ruiz. iii. Click on a candidate and then verify that the Social Security Number field is not visible.

©Copyright 2013 salesforce.com, inc. All rights reserved. Building Applications with Force.com – Exercise Guide – Page 33 of 144

8-4: Create Record Types Goal: Create a custom record type that limits the picklist choices available to hiring managers. Scenario: Technical hiring managers can open new positions, but they should only open positions in the IT and Engineering departments. The Position object has a department field that contains a picklist of values. When creating a technical position, hiring managers should have access only to the IT and Engineering values. When creating a non-technical position, hiring managers should have access to the other department values. Recruiters should be able to see and use all department values.

LY

Tasks:

O N

1. Create a technical position record type. 2. Repeat the process, creating a non-technical position record type. Time:

SE

10 minutes

U

Instructions:

1. Create a new technical position record type.

D. E. F. G. H. I. J.

TE R

Existing Record Type: Master Record Type Label: Technical Position Record Type Name: Technical_Position (This field auto-populates.) Description: This record type should be used for Technical Positions only. Active: (selected) Enable for Profile: Custom – Executive, Custom – HR, Custom – Recruiter and System Administrator only

IN

i. ii. iii. iv. v. vi.

N

AL

A. Click Setup | Create | Objects | Position. B. In the Record Types related list, click New. C. Enter the following details:

Click Next. Select the Apply one layout to all profiles radio button. Click Save. Under Picklists Available for Editing, click the Edit link next to Department. Remove all but IT and Engineering from the Selected Values. Click Save. Click the Back to Custom Object: Position link near the top of the page.

2. Repeat the process, creating a Non-Technical Position record type, making it accessible to these profiles:   

Custom – Executive Custom – HR Custom – Recruiter ©Copyright 2013 salesforce.com, inc. All rights reserved. Building Applications with Force.com – Exercise Guide – Page 34 of 144



System Administrator profiles

IN

TE R

N

AL

U

SE

O N

LY

Modify the Department picklist to remove the IT and Engineering values. Make sure to test your work.

©Copyright 2013 salesforce.com, inc. All rights reserved. Building Applications with Force.com – Exercise Guide – Page 35 of 144

8-5: Create Page Layouts Goal: Create a new page layout to reflect differences between technical and non-technical positions. Scenario: When creating new positions, technical hiring managers need to specify technical criteria desired for their candidates, such as programming language or operating system. Recruiters need to be able to create all kinds of positions. Tasks:

LY

1. Create fields for Operating System and Programming Language. 2. Create a new page layout for technical positions. On the new page layout, show the Operating System and Programming Language fields in a separate section.

O N

Time: 15 minutes

SE

Instructions:

1. Create new fields for Operating System and Programming Language.

   

TE R

N

Data Type: Picklist Click Next. Field Label: Operating Systems Picklist values: Windows, Unix, Mac (on 3 separate lines) Field Name: Operating_Systems (This field auto-populates.) Click Next. Make the field visible to these profiles: Custom – Executive Custom – HR Custom – Recruiter System Administrator profiles

IN

i. ii. iii. iv. v. vi. vii.

AL

U

A. Click Setup | Create | Objects | Position. B. Under the Custom Fields & Relationships section, click New.

viii. Click Next. ix. Uncheck all the page layouts and click Save and New to complete the field. C. Enter the data for the second new field. i. ii. iii. iv. v. vi. vii.

Field Type: Picklist Click Next. Field Label: Programming Languages Picklist values: COBOL, FORTRAN, .Net, Java, PHP, Perl, Python Field Name: Programming_Languages (This field auto-populates.) Click Next. Make the field visible to these profiles: ©Copyright 2013 salesforce.com, inc. All rights reserved. Building Applications with Force.com – Exercise Guide – Page 36 of 144

   

Custom – Executive Custom – HR Custom – Recruiter System Administrator profiles

viii. Click Next. ix. Uncheck all the page layouts and click Save to complete the field. 2. Create a new page layout for technical positions. On the new page layout, show the Operating System and Programming Language fields in a separate section. A. Click Setup | Create | Objects | Position. B. In the Page Layouts related list, click New.

LY

i. Existing Page Layout: Position Layout ii. Page Layout Name: Technical Position Layout

SE

i. Name: Technical Skills ii. Layout: 1-Column

O N

C. Click Save. D. Drag a new section from the palette to below the Compensation section.

N

AL

U

E. Click OK. F. Drag the Operating Systems and Programming Languages fields into the new section from the Information section. G. Drag the Record Type field into the Information section below the Start Date field. H. Click Save. I. Edit the page layout assignments for the Position object so Custom – Recruiter and System Administrator profiles always use the Technical Position page layout, while all other profiles will use the appropriate layout for the position.

IN

TE R

i. In the Page Layouts related list, click Page Layout Assignment. ii. Click Edit Assignment. iii. Click the cell under the Non-Technical Position Record Type column for the Custom – Recruiter and System Administrator profiles and set Page Layout to Use: Technical Position Layout. (Use the CTRL/CMD key to select multiple items.) iv. Click the Technical Position column heading and again set Page Layout to Use: Technical Position Layout to ensure that all users see the Technical Position Layout when viewing the Technical Record Type. v. Click Save. J. Log in as Mario Ruiz and verify your changes by creating a new position. Mario should see the Operating Systems and Programming Language fields regardless of whether he creates a technical or non-technical position.

©Copyright 2013 salesforce.com, inc. All rights reserved. Building Applications with Force.com – Exercise Guide – Page 37 of 144

8-6: Create Page Layouts and Record Types Goal: Create page layouts and record types for approved positions. Scenario: Universal Containers would like to implement an approval process for each position. This process will route positions to the approvers specified on the position. Once the position has been approved, the approvers no longer need to be listed on the position. Tasks:

LY

1. Create new page layout for approved positions. 2. Create new record types for approved positions. Time:

O N

10 minutes

SE

Instructions: 1. Create new page layout for approved positions.

AL

U

Click Setup | Create | Objects | Position. Under the Page Layout related list, click Edit next to Position Layout. In the arrow under Save, click Save As… Page Layout Name: Approved Position Layout Click Save. Navigate back to Setup | Create | Objects | Position.

N

A. B. C. D. E. F.

TE R

2. Create new record type for approved positions. A. Scroll down to the Record Types related list and click New.

IN

i. Existing Record Type: Technical Position ii. Record Type Label: Approved Position iii. Description: This record type will be used for positions, once they have been approved. iv. Active: (selected) v. Do not enable for any profile. B. C. D. E. F. G.

Click Next. Select Apply one layout to all profiles: Approved Position Layout. Click Save. Click the Back to Custom Object: Position link. Under the Record Types related list, click Page Layout Assignment. Verify that the Approved Position layout is assigned to the Approved Position record type.

©Copyright 2013 salesforce.com, inc. All rights reserved. Building Applications with Force.com – Exercise Guide – Page 38 of 144

Review 1. What is the advantage of using record types?

O N

LY

2. Does using record types restrict the records that are available to a profile?

AL

U

SE

3. A hiring manager creates a position with the record type of Technical Position with a Department of IT. The record type is then changed to Non-Technical Position. What value will be displayed in the Department field? What will happen if the record is edited?

IN

TE R

N

4. How can users bypass the record type selection screen if they always want to use the same record type? (Hint: it’s a user setting.)

5. Is it possible to change the record type of a record after it has been created? Does this change the page layout used to display that record?

©Copyright 2013 salesforce.com, inc. All rights reserved. Building Applications with Force.com – Exercise Guide – Page 39 of 144

9-1: Create Custom Object Queues Goal: Create a custom queue for the Recruiting department to hold position and candidate records. Scenario: Universal Containers wants to use the queue feature to manage the pool of recruiters working with open positions and candidates. Task: Create a queue for positions and candidates. Time:

Instructions 1. Create a queue for positions and candidates.

O N

LY

5 minutes

N

AL

Label: Recruiter Queue Queue Name: Recruiter_Queue (This field auto-populates.) Queue Email: (leave blank) Send Email to Members: (selected) Add the Position object and Candidate object to the Selected Objects box. Assign Mario Ruiz, Megan Smith, and Phil Katz as Selected Members of the queue.

Review

IN

D. Click Save.

TE R

i. ii. iii. iv. v. vi.

U

SE

A. Click Setup | Manage Users | Queues. B. Click New. C. Enter the queue information.

1. What are the only two types of record owners in Salesforce?

2. What are some common uses of queues?

©Copyright 2013 salesforce.com, inc. All rights reserved. Building Applications with Force.com – Exercise Guide – Page 40 of 144

9-2: Set Organization-Wide Defaults Goal: Use organization-wide defaults (OWD) to restrict edit permissions for position data. Scenario: At Universal Containers, standard users (who are not recruiters), hiring managers, and interviewers are only allowed to view position data. There will never be any position that a standard user is not permitted to see. Task: Change the organization-wide default setting for Positions.

LY

Time:

O N

5 minutes

Instructions:

N

Click Setup | Manage Users | Users. Click the Login link next to Clark Kentman. Verify that you cannot edit any position that you do not own. Log out.

TE R

i. ii. iii. iv.

AL

U

Click Setup | Security Controls | Sharing Settings. If you see a splash page, click Set Up Sharing. Click Edit to edit the organization-wide defaults. Set access on the Position object to Public Read Only. Click Save. Log in as Clark Kentman to test.

IN

A. B. C. D. E. F.

SE

1. Change the organization-wide default setting for Positions.

©Copyright 2013 salesforce.com, inc. All rights reserved. Building Applications with Force.com – Exercise Guide – Page 41 of 144

9-3: Set Organization-Wide Defaults Goal: Establish appropriate organization-wide defaults for Candidates, Job Applications, and Reviews. Scenario: The accessibility for Candidate, Job Application, and Review records should be as follows: Individuals in Human Resources should be able to read, create, and edit the Candidate, Job Application, or Review records. This includes the VP and any subordinates.



Interviewers should be permitted to see only those Candidate and Job Application records to which they have been assigned as interviewers. Additionally, they should only be permitted to view, create, and modify their own Review records.



Hiring managers should only be able to see a Candidate, Job Application, or Review record if it is related to a Position for which they are responsible.



Other users should not have access to Candidate, Job Application, and Review records.

O N

LY



Task:

SE

Update organization-wide defaults for Candidates, Job Applications, and Reviews to limit general viewing of records.

U

Time:

AL

5 minutes

N

Instructions:

Click Setup | Security Controls | Sharing Settings. Under Organization-Wide Defaults, click Edit. Set access on the Candidate object to Private. Set access on the Job Application object to Private. Click Save. Log in as Craig Kingman to test.

IN

A. B. C. D. E. F.

TE R

1. Update organization-wide defaults for Candidates, Job Applications, and Reviews to limit general viewing of records.

i. ii. iii. iv.

Click Setup | Manage Users | Users. Click the Login link next to Craig Kingman. Verify that you cannot view any job application or candidate records. Log out.

©Copyright 2013 salesforce.com, inc. All rights reserved. Building Applications with Force.com – Exercise Guide – Page 42 of 144

Review 1. Why aren’t we able to set an organization-wide default for Reviews?

O N

LY

2. What are the two questions that you should ask yourself when trying to decide how to set OWD permissions for an object?

IN

TE R

N

AL

U

SE

3. What is fundamentally different about the way OWD affects data than all of the other data access controls?

©Copyright 2013 salesforce.com, inc. All rights reserved. Building Applications with Force.com – Exercise Guide – Page 43 of 144

9-4: Implement a Role Hierarchy Goal: Complete the role hierarchy by adding a role for product managers. Scenario: Universal Containers has added a new role called Product Manager and would like their hierarchy to reflect the addition. Tasks:

LY

1. Add a new Product Manager role. 2. Assign users to the new role. 3. Log in as a Product Manager and as the Director of Product Management to test the changes to the hierarchy.

O N

Time:

Instructions: 1. Add a new Product Manager role.

U

Click Setup | Manage Users | Roles. If you see the splash page, click Set Up Roles. Click the Expand All link. Under the Director Product Management node, click the Add Role link.

AL

A. B. C. D.

SE

5 minutes

E. Click Save.

TE R

N

i. Label: Product Manager ii. Role Name: Product_Manager (This field auto-populates.) 2. Assign users to the new role.

Click Assign Users to Role. Change the Available Users view to All Users. Move Amy Lojack and Andy Macrola to Selected Users for Product Manager. Click Save.

IN

A. B. C. D.

3. Log in as a Product Manager and as the Director of Product Management to test the changes to the hierarchy. A. B. C. D. E.

Click Setup | Manage Users | Users. Click the Login link next to Amy Lojack. Create a new Position. Click Logout. Click the Login link next to Frank Linstrom. Verify that you are able to edit the position that you just created as Amy. F. Log out and log in as Megan Smith. Verify that you cannot edit the position created by Amy.

©Copyright 2013 salesforce.com, inc. All rights reserved. Building Applications with Force.com – Exercise Guide – Page 44 of 144

Review 1. Can Andy see candidates that are owned by Amy? Can Frank?

IN

TE R

N

AL

U

SE

O N

LY

2. What is an instance where the role hierarchy might not match a company’s management structure?

©Copyright 2013 salesforce.com, inc. All rights reserved. Building Applications with Force.com – Exercise Guide – Page 45 of 144

9-5: Create a Public Group Goal: Create a new public group including all interviewers. Scenario: Universal Containers would like to create a public group that includes all interviewers so that they can easily share records and documents with them. Task: Create a public group called All Interviewers. Time:

Instructions: 1. Create a public group called All Interviewers.

O N

LY

5 minutes

AL

U

Label: All Interviewers Group Name: All_Interviewers (This field auto-populates.) Search: Users Selected Members: Craig Kingman, Melissa Lee, Harry Potterham, Flash Stevenson, Tom Zales

N

i. ii. iii. iv.

SE

A. Click Setup | Manage Users | Public Groups. B. Click New.

Review

TE R

C. Click Save.

IN

1. What users/groups can be a part of a public group?

2. Where are public groups used?

©Copyright 2013 salesforce.com, inc. All rights reserved. Building Applications with Force.com – Exercise Guide – Page 46 of 144

9-6: Implement Manual Sharing Goal: Add manual sharing for various users to grant access on records where they are invested in the information. Scenario: Establish manual sharing at Universal Containers to accomplish the remaining access levels: Grant hiring managers read and update access on positions and candidates where they are the hiring manager.



Grant interviewers read access on job application and candidate records for people they are interviewing.

LY



Establish manual sharing for an existing position. Time:

SE

5 minutes

O N

Task:

U

Instructions:

AL

1. Establish manual sharing for an existing position. (Note: This must be accomplished on a record-by-record basis by the owner, the manager of the owner, or the system administrator of a record.)

IN

TE R

N

A. Click the Positions tab. B. Select a position from the Recent Positions list. (If you do not see any positions listed, select All from the View: picklist and click Go! This will bring up a list of all positions; click on any of them.) C. Note the Hiring Manager listed on the position. D. Click Sharing. E. Click Add. i. Search: Users ii. Add the hiring manager to the Share With box. iii. Access Level: Read/Write F. Click Save. Note: This would have to be repeated for each specific object record to be shared, as required. G. Log in as the hiring manager to verify that you can edit the position that you shared. i. Click Setup | Manage Users | Users. ii. Click the Login link next to the hiring manager. iii. Search for the position that you shared.

©Copyright 2013 salesforce.com, inc. All rights reserved. Building Applications with Force.com – Exercise Guide – Page 47 of 144

Review 1. Why is this method not appropriate for a system-wide solution?

IN

TE R

N

AL

U

SE

O N

LY

2. Who are the three types of users that can grant sharing privileges on a given record?

©Copyright 2013 salesforce.com, inc. All rights reserved. Building Applications with Force.com – Exercise Guide – Page 48 of 144

9-7: Implement Sharing Rules Goal: Allow recruiters, recruiting managers, and the VP of Human Resources to view all elements of the recruiting process. Scenario: Recruiters and their management should be able to read and update every position, candidate, job application, and review record in the application. Tasks:

LY

Create sharing rules to give recruiters the access they need to positions, candidates, job applications, and reviews. Time:

O N

10 minutes

SE

Instructions:

1. Create sharing rules to give recruiters the access they need to positions, candidates, job applications, and reviews.

N

Label: VP Human Resources Rule Rule Name: VP_Human_Resources_Rule (This field auto-populates.) Rule Type: Based on Record Owner Position: owned by members of: Public Groups | All Internal Users Share with: Roles and Subordinates | VP Human Resources Access Level: Read/Write

TE R

i. ii. iii. iv. v. vi.

AL

U

A. Click Setup | Security Controls | Sharing Settings. B. If you see the splash page, click Set Up Sharing. C. In the Position Sharing Rules related list, click New.

IN

D. Click Save. E. Click OK to the dialog box that appears warning that “This operation could take significant time. Are you sure?” F. Repeat for the Candidate and Job Application objects. G. Log in as Megan Smith, the VP of Human Resources, to verify that you have access to all positions, candidates, and job applications. H. Click Setup | Manage Users | Users. I. Click the Login link next to Megan Smith. J. Click the Positions tab, select All from the View picklist, and click Go! K. Verify that Megan can edit all of the positions that you have created thus far.

©Copyright 2013 salesforce.com, inc. All rights reserved. Building Applications with Force.com – Exercise Guide – Page 49 of 144

Review 1. What are the levels of access that can be granted through sharing rules?

IN

TE R

N

AL

U

SE

O N

LY

2. Could you create a sharing rule for reviews to share records owned by the entire organization to a particular user? Why or why not?

©Copyright 2013 salesforce.com, inc. All rights reserved. Building Applications with Force.com – Exercise Guide – Page 50 of 144

9-8: Create Apex Sharing Reasons Goal: Define the reasons that a record may be shared. Scenario: Universal Containers wants to add new Apex sharing reasons to show the reasons why a record may be shared. Tasks: 1. Create new Apex sharing reasons. 2. Add sharing on a position record to see the new sharing reasons.

LY

Time:

O N

5 minutes

Instructions:

SE

1. Create a new Apex sharing reason.

U

A. Click Setup | Create | Objects | Position. B. On the Apex Sharing Reasons related list, click New.

C. Click Save & New.

AL

i. Reason Label: Approved Position ii. Reason Name: Approved_Position (This field auto-populates.)

TE R

N

i. Reason Label: Approver ii. Reason Name: Approver D. Click Save & New.

IN

i. Reason Label: Hiring Manager ii. Reason Name: Hiring_Manager E. Click Save.

2. Add sharing on a position record to see the new sharing reasons. A. B. C. D. E.

Click the Positions Tab. Select any position. Click Sharing. Click Add. Take note of the new reasons in the Reason picklist.

©Copyright 2013 salesforce.com, inc. All rights reserved. Building Applications with Force.com – Exercise Guide – Page 51 of 144

10-1: Establish Data Access Goal: Create a process by which position access is determined by the status of a position. Scenario: Universal Containers has determined that new and open positions should be visible to all users, but a closed position should only be visible to recruiters, and the related hiring manager. Only recruiters and their managers should be able to add sharing to a position. Tasks:

LY

1. Set the organization-wide default for positions to Private. 2. Create a criteria-based sharing rule that gives the entire organization access to new and open positions.

O N

Time: 20 minutes

SE

Instructions:

1. Set the organization-wide default for positions to Private.

U

Click Setup | Security Controls | Sharing Settings. Click Edit in the Organization-Wide Defaults. Select Private for the Position object. Click Save.

AL

A. B. C. D.

TE R

N

2. Create a criteria-based sharing rule that gives the entire organization access to open positions. A. Click Setup | Security Controls | Sharing Settings. B. Scroll down to the Position Sharing Rules section and click New. Label: All View New and Open Positions Rule Name: All_View_New_and_Open_Positions (This field auto-populates.) Rule Type: Based on criteria Criteria: Status | equals | New, Open Share with: Public Group | All Internal Users Access Level: Read Only

IN

i. ii. iii. iv. v. vi.

C. Click Save.

©Copyright 2013 salesforce.com, inc. All rights reserved. Building Applications with Force.com – Exercise Guide – Page 52 of 144

10-2: Restrict Data Access Goal: Ensure that the salary for any position is visible only to the recruiter, the hiring manager, and the hiring manager’s boss. Scenario: Universal Containers has decided that salary information for any position should be visible only to the recruiter, the hiring manager for that position, and the hiring manager’s boss. The recruiter should control the salary data. Tasks:

LY

Create a new Salary object. Add custom fields to the Salary object. Give hiring managers and recruiters access to the new Salary Object. Set organization-wide defaults for Salaries. Remove the Min Pay and Max Pay fields and the Compensation section from the Position page layouts.

O N

1. 2. 3. 4. 5.

SE

Time:

U

20 minutes

1. Create a new Salary object.

AL

Instructions:

TE R

N

A. Click Setup | Create | Objects. B. Click New Custom Object.

IN

i. Label: Salary ii. Plural Label: Salaries iii. Object Name: Salary (This field auto-populates.) iv. Record Name: Salary Number v. Data Type: Auto Number vi. Display Format: PAY-{0000} vii. Starting Number: 1 viii. Allow Reports: (selected) ix. Allow Activities: (selected) x. Track Field History: (selected) xi. Deployment Status: Deployed xii. Add Notes and Attachments related list to default page layout: (cleared) xiii. Launch New Custom Tab Wizard after saving this custom object: (cleared) C. Click Save. 2. Add custom fields to the Salary object. A. Under the Custom Fields & Relationships related list, click New. B. Click the Currency radio button under Data Type. C. Click Next. ©Copyright 2013 salesforce.com, inc. All rights reserved. Building Applications with Force.com – Exercise Guide – Page 53 of 144

i. ii. iii. iv.

Field Label: Actual Pay Length: 8 Decimal Places: 0 Field Name: Actual_Pay (This field auto-populates.)

D. Click Next. E. Make the field visible to these profiles:

i. ii. iii. iv.

O N

Click Next. Click Save & New. Click the Currency radio button under Data Type. Click Next. Field Label: Max Pay Length: 8 Decimal Places: 0 Field Name: Max_Pay

U

J. Click Next. K. Make the field visible to these profiles:

SE

F. G. H. I.

Custom – Executive Custom – HR Custom – Recruiter System Administrator profiles

LY

   

AL

N

Click Next. Click Save & New. Click the Currency radio button under Data Type. Click Next. i. ii. iii. iv.

IN

L. M. N. O.

Custom – Executive Custom – HR Custom – Recruiter System Administrator profiles

TE R

   

Field Label: Min Pay Length: 8 Decimal Places: 0 Field Name: Min_Pay

P. Click Next. Q. Make the field visible to these profiles:    

Custom – Executive Custom – HR Custom – Recruiter System Administrator profiles

R. Click Next. S. Click Save & New. T. Click the Lookup Relationship radio button under Data Type. ©Copyright 2013 salesforce.com, inc. All rights reserved. Building Applications with Force.com – Exercise Guide – Page 54 of 144

U. Click Next. V. Select Position from the Related To picklist. W. Click Next. i. Field Label: Position ii. Field Name: Position X. Click Next. Y. Set the field visible for the Custom-HR, Custom-Executive, Custom-Recruiter, and System Administrator profiles and click Next. Z. Click Next to add the field to the Salary Layout. AA.Click Save to add the Salary Related List to all three Position Layouts.

O N

SE

U

AL

H. I. J. K. L. M.

Click Manage Users | Profiles, then click the Custom – Recruiter link. Click Object Settings. Click on the Salaries object. Click Edit. Select Read, Edit, and Create in the Object Permissions table. Click Save. Repeat this for the Custom – Executive and Custom – HR profiles to give them Read, Edit, and Create access to the Salaries object. Click Manage Users | Permission Sets, then click on the Hiring Managers link. Click Object Settings. Click on the Salaries object. Click Edit. Select Read in the Object Permissions table. Click Save.

N

A. B. C. D. E. F. G.

LY

3. Give hiring managers and recruiters access to the new Salary Object.

TE R

4. Set organization-wide defaults for Salaries. A. Click Setup | Security Controls | Sharing Settings. B. Under Organization-Wide Defaults, click Edit.

IN

i. Salary: Private ii. Grant Access Using Hierarchies: (all cleared) C. Click Save.

5. Remove the Min Pay and Max Pay fields and the Compensation section from the Position page layouts. A. B. C. D. E.

Click Setup | Create | Objects | Position. Scroll down to the Page Layouts section and click the Edit link next to Position Layout. Drag the Compensation section off of the page layout and onto the palette. Click Save. Repeat for the Approved Position Layout and Technical Position Layout.

©Copyright 2013 salesforce.com, inc. All rights reserved. Building Applications with Force.com – Exercise Guide – Page 55 of 144

11-1: Create Formula Fields to Display Images Goal: Build a formula field that displays an image. Scenario: Universal Containers would like to add a visual indicator of the Rating on a job application. Job Applications with a high rating should display a green flag; a medium rating should display a yellow flag; and a low rating should display a red flag. Universal Containers can take advantage of a number of sample images available on the Salesforce servers. Tasks:

O N

LY

1. Create a new formula field to show a green, yellow, or red flag on a job application record, depending on the Average Review Score. 2. Test the customization by looking at a job application record to see the new Rating field. 3. Add the new Rating field to the Job Application related list on the Position page layout. Time:

SE

10 minutes

U

Instructions:

AL

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

TE R

N

A. Click Setup | Create | Objects | Job Application. B. Scroll down to the Custom Fields & Relationships related list and click New. C. Select the Formula radio button and click Next. i. Field Label: Rating ii. Field Name: Rating (This field auto-populates.) iii. Formula Return Type: Text i.

IN

D. Click Next.

Enter the following formula in the Rating (Text) = textbox: 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") , IMAGE("/img/samples/light_red.gif", "Red") ) )

ii. Click Check Syntax. E. Click Next. F. Set the field visible for the Custom-HR, Custom-Executive, Custom-Recruiter and System Administrator profiles and click Next. G. Click Save to add the field to the Job Application Layout. 2. Test the customization by looking at a job application record to see the new Rating field. ©Copyright 2013 salesforce.com, inc. All rights reserved. Building Applications with Force.com – Exercise Guide – Page 56 of 144

A. B. C. D.

Click the Job Applications tab. Select All from the View picklist, and click Go! Click the job application record, APP-0000. Note the new Rating indicator.

3. Add the new Rating field to the Job Application related list on the Position page layout. A. Click Setup | Create | Objects | Position. B. Scroll down to the Page Layouts related list, then click the Edit link next to Position Layout.

LY

i. Click the wrench icon on the Job Applications related list. ii. Select Rating from the Available Fields list, and then click Add to move it to the Selected Fields list. iii. In the Apply column information to other page layouts: section, ensure that the Select All checkbox is selected.

IN

TE R

N

AL

U

SE

O N

C. Click OK. D. Click Save.

©Copyright 2013 salesforce.com, inc. All rights reserved. Building Applications with Force.com – Exercise Guide – Page 57 of 144

11-2: Create Formula Fields to Display Hyperlinks Goal: Build a formula field that displays a hyperlink. Scenario: Universal Containers would like to be able to click a link on the candidate object to see a photo of the candidate. The images will be stored in the Documents tab, so the company will need to create a field to capture the ID, a field to create the URL, and a field with a link that users can click to see the picture—in addition to embedding the image into the page. Tasks:

LY

1. Create a new field for the Picture ID. 2. Populate a candidate record’s Picture ID field and view the picture.

O N

Time:

Instructions: 1. Create a new field for the Picture ID.

U

Click Setup | Create | Objects | Candidate. Scroll down to the Custom Fields & Relationships related list, and click New. Select the Text radio button and click Next. Enter the details for the first new custom field.

AL

A. B. C. D.

SE

15 minutes

TE R

N

i. Field Label: Picture ID ii. Length: 18 iii. Field Name: Picture_ID (This field auto-populates.)

IN

E. Click Next. F. Set the field visible for the Custom-HR, Custom-Executive, Custom-Recruiter and System Administrator profiles and click Next. G. Click Save & New to add the field to the Candidate Layout. H. Select the Formula radio button and click Next. I. Enter the details for the second new custom field. i. Field Label: Picture URL ii. Field Name: Picture_URL (This field auto-populates.) iii. Formula Return Type: Text J. Click Next. i.

Enter the following formula in the Picture URL (Text) = textbox: IF(ISBLANK(Picture_ID__c ), "", "/servlet/servlet.FileDownload?file=" & Picture_ID__c )

ii. Click Check Syntax. K. Click Next. ©Copyright 2013 salesforce.com, inc. All rights reserved. Building Applications with Force.com – Exercise Guide – Page 58 of 144

L. Set the field visible for the Custom-HR, Custom-Executive, Custom-Recruiter and System Administrator profiles and click Next. M. Click Save & New to add the field to the Candidate Layout. N. Select the Formula radio button and click Next. O. Enter the details for the third new custom field. i. Field Label: Picture Link ii. Field Name: Picture_Link (This field auto-populates.) iii. Formula Return Type: Text P. Click Next. i.

Enter the following formula in the Picture Link (Text) = textbox:

O N

LY

IF( ISBLANK( Picture_ID__c ), "", HYPERLINK("/servlet/servlet.FileDownload?file=" & Picture_ID__c , "Candidate Picture")) ii. Click Check Syntax.

U

SE

Q. Click Next. R. Set the field visible for the Custom-HR, Custom-Executive, Custom-Recruiter, and System Administrator profiles, and click Next. S. Click Save & New to add the field to the Candidate Layout. T. Select the Formula radio button and click Next. U. Enter the details for the final new custom field.

N

AL

i. Field Label: Picture ii. Field Name: Picture (This field auto-populates.) iii. Formula Return Type: Text i.

TE R

V. Click Next.

Enter the following formula in the Picture (Text) = textbox: IMAGE(Picture_URL__c , "Picture") ii. Click Check Syntax.

IN

W. Click Next. X. Set the field visible for the Custom-HR, Custom-Executive, Custom-Recruiter and System Administrator profiles and click Next. Y. Click Save to add the field to the Candidate Layout. 2. Populate a candidate record’s Picture ID field and view the picture. A. Click the Documents tab. (If necessary, click + to view more tabs.) B. Select Public Photos from the Folder picklist, and click Go! C. Click on one of the documents listed, then copy the last 15 digits of the URL for that document (everything after .com/) from the browser address bar. D. Click the Candidates tab. E. Click New. F. Fill in the information needed to create a new candidate record. G. Paste the ID of the photo you selected from the document into the Picture ID field. H. Click Save. Note how the Picture URL is populated, then click on the Candidate Picture link. ©Copyright 2013 salesforce.com, inc. All rights reserved. Building Applications with Force.com – Exercise Guide – Page 59 of 144

12-1: Create Validation Rules Goal: Create validation rules to enforce business requirements. Scenario: Universal Containers (UC) employees should not be able to save a position record unless the Hiring Manager field is filled out. Task: Create a new validation rule that requires that all positions must have a Hiring Manager listed. Time:

O N

LY

10 minutes

Instructions:

SE

1. Create a new validation rule that requires that all positions must have a Hiring Manager listed.

N

AL

Rule Name: Every Position Must Have a Hiring Mgr Active: (selected) Description: Every position record must have a hiring manager. Error Condition Formula: LEN( Hiring_Manager__c ) = 0 Click Check Syntax to verify your formula. Error Message: Every Position must have a Hiring Manager. Error Location: Field: Hiring Manager

TE R

i. ii. iii. iv. v. vi. vii.

U

A. Click Setup | Create | Objects | Position. B. In the Validation Rules related list, click New.

IN

C. Click Save. D. Create a new Position record to test these validation rules.

©Copyright 2013 salesforce.com, inc. All rights reserved. Building Applications with Force.com – Exercise Guide – Page 60 of 144

Review 1. Are validation rules executed for fields that are stored in the object but not part of the displayed page layout?

O N

LY

2. Are validation rules executed when loading data through the API or the Data Loader? Are there exceptions?

AL

U

SE

3. If a new rule is created and there is data already stored that violates that rule, when will Salesforce catch the problem?

IN

TE R

N

4. If a user does not include a reference to a Hiring Manager when creating a new Position, when will they be notified of the omission?

©Copyright 2013 salesforce.com, inc. All rights reserved. Building Applications with Force.com – Exercise Guide – Page 61 of 144

12-2: Build Validation Rules to Enforce Conditionally Required Fields Goal: Build a validation rule that prevents users from saving Temp positions with a blank Duration. Scenario: Universal Containers would like to enforce its policies around Temporary positions. The Duration field on a Temp position should not be blank. It should contain a value between 1 and 365. Tasks: Build a new validation rule that ensures that these policies are followed. Set the Debug Log to track actions that you take. Create a new position to test that the validation rule works. Check the Debug Logs.

LY

1. 2. 3. 4.

O N

Time:

SE

10 minutes

Instructions:

U

1. Build a new validation rule that ensures that these policies are followed.

AL

A. Click Setup | Create | Objects | Position. B. Scroll down to the Validation Rules related list and click New.

IN

TE R

N

i. Rule Name: Temp Position Validation ii. Active: (selected) iii. Description: Temporary positions require a value for Duration between 1 and 365 days. iv. Error Condition Formula: ISPICKVAL( Type__c , "Temp") && (BLANKVALUE(Duration__c,0)365) v. Click Check Syntax to verify your formula. vi. Error Message: Temporary positions require a value for Duration between 1 and 365 days. vii. Error Location: Field: Duration C. Click Save. 2. Set the Debug Log to track actions that you take. A. B. C. D.

Click Setup | Monitor | Logs | Debug Logs. Click New. Click the lookup icon to select the Admin User. Click Save.

3. Create a new position to test that the validation rule works. A. Click the Positions tab. B. Click New.

©Copyright 2013 salesforce.com, inc. All rights reserved. Building Applications with Force.com – Exercise Guide – Page 62 of 144

C. Select Non-Technical Position from the Record Type of new record picklist, and click Continue.

O N

LY

i. Title: Assistant to the Director of Support ii. Type: Temp iii. Department: Support iv. Location: San Francisco v. Pay Grade: S-100 vi. Hiring Manager: Frank Linstrom vii. Priority: High viii. Status: New ix. Date Opened: (today’s date) x. Job Description: The Assistant to the Director of Support is a diverse and fast-paced role supporting the director of our 250 person support organization.

SE

D. Click Save. E. After receiving the error Temporary positions require a value for Duration between 1 and 365 days, enter the Duration as 364, then click Save again. 4. Check the Debug Logs.

AL

U

A. Click Setup | Monitor | Logs | Debug Logs. B. Click the View link next to the first listing (at the bottom of the list) for Admin User to view the logs. Note the result: VALIDATION_FAIL

TE R

N

C. Click Back to List: Debug Logs (in the upper left). D. Click the View link next to the second listing for Admin User to view the logs.

IN

Note the result: VALIDATION_PASS

©Copyright 2013 salesforce.com, inc. All rights reserved. Building Applications with Force.com – Exercise Guide – Page 63 of 144

12-3: Build Validation Rules to Enforce Data Format Goal: Build a validation rule that enforces proper data format. Scenario: Universal Containers would like to make sure that when candidates are entered, the zip code is entered in the correct format. Tasks:

LY

1. Create a validation rule on candidates that requires that zip codes be entered in a valid 5digit or 9-digit format. 2. Test the validation rule on an existing candidate. Time:

O N

10 minutes

SE

Instructions:

1. Create a validation rule on candidates that requires that zip codes be entered in a valid 5digit or 9-digit format.

AL

U

A. Click Setup | Create | Objects | Candidate. B. Scroll down to the Validation Rules related list and click New.

IN

TE R

N

i. Rule Name: Zip code must be Valid US Postal Code ii. Active: (selected) iii. Description: Validates that the candidate Zip/Postal Code is in 99999 or 99999-9999 format if Country is USA or US. iv. Error Condition Formula: (Country__c == "USA" || Country__c == "US") && NOT(REGEX(Zip_Postal_Code__c,"\\d{5}(-\\d{4})?")) v. Click Check Syntax to verify your formula. vi. Error Message: Zip code must be in 99999 or 99999-9999 format. vii. Error Location: Field: Zip/Postal Code C. Click Save.

2. Test the validation rule on an existing candidate. A. Click the Candidates tab. B. Select All from the View picklist and click Go! C. Select any Candidate and click Edit. i. Country: USA ii. Zip/Postal Code: 9410 D. Click Save. E. After receiving the error Zip code must be in 99999 or 99999-9999 format, update the zip code to 94105 and click Save.

©Copyright 2013 salesforce.com, inc. All rights reserved. Building Applications with Force.com – Exercise Guide – Page 64 of 144

12-4: Build Validation Rules to Enforce Consistency Goal: Build a validation rule that enforces data consistency. Scenario: Universal Containers would like to ensure that when a zip code is entered, it matches the state that’s entered. For example, a candidate with a California zip code should not have a state of New York. Tasks: Create an object on which to store zip code data. Create additional fields on the Zip Code object. Create new zip code records. Create a validation rule that checks the zip code entered against a table to validate that the zip code and state match. 5. Create a new Candidate to test your Zip Code object and validation rule.

O N

LY

1. 2. 3. 4.

Time:

SE

15 minutes

U

Instructions:

AL

1. Create an object on which to store zip code data.

i. ii. iii. iv.

N

A. Click Setup | Create | Objects. B. Click New Custom Object.

IN

TE R

Label: Zip Code Plural Label: Zip Codes Object Name: Zip_Code (This field auto-populates.) Context-Sensitive Help Setting: Open the standard Salesforce.com Help & Training window. v. Record Name: Zip Code vi. Data Type: Text vii. Allow Reports: (selected) viii. Allow Activities: (cleared) ix. Track Field History: (cleared) x. Deployment Status: Deployed xi. Launch New Custom Tab Wizard after saving this custom object: (selected) C. Click Save. D. Use the lookup icon to select the Map tab style, and click Next. E. Make the tab Default On for the Custom-HR, Custom-Executive, Custom-Recruiter and System Administrator profiles and click Next. F. Include the tab in the Recruiting application only, and click Save. 2. Create additional fields on the Zip Code object. A. Under Custom Fields & Relationships, click New. ©Copyright 2013 salesforce.com, inc. All rights reserved. Building Applications with Force.com – Exercise Guide – Page 65 of 144

B. Select the Text radio button and click Next. C. Enter the details for the first new custom field. i. Field Label: State ii. Length: 2 iii. Field Name: State (This field auto-populates.)

O N

i. Field Label: City ii. Length: 80 iii. Field Name: City (This field auto-populates.)

LY

D. Click Next. E. Set the field visible for the Custom-HR, Custom-Executive, Custom-Recruiter and System Administrator profiles and click Next. F. Click Save & New to add the field to the zip code layout. G. Select the Text radio button and click Next. H. Enter the details for the second new custom field.

SE

I. Click Next. J. Set the field visible for the Custom-HR, Custom-Executive, Custom-Recruiter, and System Administrator profiles, and click Next. K. Click Save to add the field to the zip code layout. L. Modify the Zip Code page layout so that the fields are displayed in a logical order.

Click the Zip Codes tab. Click New. Enter the City, State, and Zip Code for any location. Click Save. Repeat to create 3 to 5 zip code records (to look up Zip Codes for any city, go to http://zip4.usps.com/zip4/citytown.jsp).

TE R

A. B. C. D. E.

N

Create new zip code records.

IN

3.

AL

U

i. Under the Page Layout related list, click the Edit link next to Zip Code Layout. ii. Arrange the fields in the left hand column of the page layout so that City is on top, then State, then Zip Code. iii. Click Save.

4. Create a validation rule that checks the zip code entered against a table to validate that the zip code and state match. A. Click Setup | Create | Objects | Candidate. B. Scroll down to the Validation Rules related list and click New. i. Rule Name: Zip Code Consistent with State ii. Active: (selected) iii. Description: 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.

©Copyright 2013 salesforce.com, inc. All rights reserved. Building Applications with Force.com – Exercise Guide – Page 66 of 144

iv. Error Condition Formula: AND(VLOOKUP($ObjectType.Zip_Code__c.Fields.State__c, $ObjectType.Zip_Code__c.Fields.Name, LEFT( Zip_Postal_Code__c ,5) ) State_Province__c, NOT(Batch_Load_Item__c) ) v. Click Check Syntax to verify your formula. vi. Error Message: Candidate Zip Code does not exist in specified State. vii. Error Location: Field: Zip/Postal Code C. Click Save. 5. Create a new Candidate to test your Zip Code object and validation rule.

LY

A. Click the Candidates tab. B. Click New.

Populate a new Candidate with a Zip Code that matches a Zip Code record that you have already created. ii. Enter a State that does not match the Zip Code.

IN

TE R

N

AL

U

SE

C. Click Save. D. Note the validation error that you receive.

O N

i.

©Copyright 2013 salesforce.com, inc. All rights reserved. Building Applications with Force.com – Exercise Guide – Page 67 of 144

12-5: Create Validation Rules to Prevent Data Loss (Optional) Goal: Build a validation rule that prevents users from adding or deleting reviews once a job application has been approved. Scenario: Universal Containers would like make sure that once a job application is approved, users will not be able to add or remove reviews. Tasks:

LY

1. Create a validation rule that references the Total Reviews roll-up summary field to ensure that reviews are not added or deleted. 2. Test the validation rule.

O N

Time: 10 minutes

SE

Instructions:

U

1. Create a validation rule that references the Total Reviews roll-up summary field to ensure that reviews are not added or deleted.

AL

A. Click Setup | Create | Objects | Job Application. B. Scroll down to the Validation Rules related list and click New.

TE R

N

i. Rule Name: No New Deleted Reviews for Approved Apps ii. Active: (selected) iii. Description: Once a Job Application is approved, there can be no new Reviews. Likewise, no Reviews can be deleted. iv. Error Condition Formula: ISCHANGED(

IN

AND( ISPICKVAL( Status__c , "Approved") , Total_Reviews__c ))

v. Click Check Syntax to verify your formula. vi. Error Message: Once a Job Application is approved, there can be no change to the number of Reviews. vii. Error Location: Top of Page C. Click Save. 2. Test the validation rule. A. Click the Job Applications tab. B. Click APP-0000. C. Click Edit. i. Change the Status to Approved. ii. Click Save.

©Copyright 2013 salesforce.com, inc. All rights reserved. Building Applications with Force.com – Exercise Guide – Page 68 of 144

IN

TE R

N

AL

U

SE

O N

LY

D. Scroll down and click the Del link next to the review listed in the Reviews related list. E. When you receive the popup that says, “Are you sure?,” click OK.

©Copyright 2013 salesforce.com, inc. All rights reserved. Building Applications with Force.com – Exercise Guide – Page 69 of 144

13-1: Create Workflow Rules Goal: Create custom workflow rules and associated field updates for routing new Positions and Candidates to the recruiters. Scenario: At Universal Containers, recruiters are responsible for approving or rejecting proposed positions created by hiring managers.

LY

When a new candidate has been created, the candidate should be assigned to the Recruiter Queue and a New Candidate Notification should automatically be sent out to all queue members. Tasks:

O N

1. Create a workflow rule with a field update to route new Positions to the Recruiting Queue. 2. Create a workflow rule with a field update to assign new candidates to the Recruiting Queue.

SE

Time:

U

15 minutes

Instructions:

N

Click Setup | Create | Workflow & Approvals | Workflow Rules. If the splash page appears, click Continue. Click New Rule. Select Position from the Select object picklist, and click Next. Configure rule.

TE R

A. B. C. D. E.

AL

1. Create a workflow rule with a field update to route new Positions to the Recruiting Queue.

IN

i. Rule Name: New Position Rule ii. Evaluate the rule when a record is: Only when a record is created iii. Run this rule if the following: criteria are met: Status | equals | New F. Click Save & Next. G. In the Immediate Workflow Actions section, click Add Workflow Action: New Field Update. i. Name: Assign New Position to Recruiter Queue ii. Unique Name: Assign_New_Position_to_Recruiter_Queue (This field autopopulates.) iii. Field to Update: Owner iv. Owner: Queue | Recruiter Queue v. Notify Assignee: (selected) H. Click Save. I. Click Done. J. Click Activate. ©Copyright 2013 salesforce.com, inc. All rights reserved. Building Applications with Force.com – Exercise Guide – Page 70 of 144

K. Click the Positions tab and add a new position, setting the Status to New. Once you have saved it, check the Owner field on the new record. 2. Create a workflow rule with a field update to assign new candidates to the Recruiting Queue. A. B. C. D. E.

Click Setup | Create | Workflow & Approvals | Workflow Rules. If you see the splash page, click Continue. Click New Rule. Select Candidate from the Select object picklist, and click Next. Configure rule.

LY

i. Rule Name: New Candidate Notification ii. Evaluate the rule when a record is: Only when a record is created iii. Field: Operator: Value: Created Date | equals | TODAY

TE R

N

Click Save. Click Done. Click Activate. Click the Candidates tab and create a new candidate. Make sure to enter information for email, name, and phone. Once you have saved it, check the Owner field on the new record.

IN

H. I. J. K.

SE

iii. iv. v.

U

ii.

Name: Assign New Candidate to Recruiter Queue Unique Name: Assign_New_Candidate_to_Recruiter_Queue (This field auto-populates.) Field to Update: Owner Owner: Queue: Recruiter Queue Notify Assignee: (selected)

AL

i.

O N

F. Click Save & Next. G. In the Immediate Workflow Actions section, click Add Workflow Action: New Field Update.

©Copyright 2013 salesforce.com, inc. All rights reserved. Building Applications with Force.com – Exercise Guide – Page 71 of 144

Review 1. How is a workflow rule triggered?

O N

LY

2. What must you do after saving a rule to have it take effect?

IN

TE R

N

AL

U

SE

3. Although just setting up the workflow to start when Status | equals | New is helpful, what happens if Status is not set? What other customization(s) could be made to ensure that this workflow is launched?

©Copyright 2013 salesforce.com, inc. All rights reserved. Building Applications with Force.com – Exercise Guide – Page 72 of 144

13-2: Set Up Time-Dependent Workflow Goal: Create a workflow rule that will escalate offers that have been open for two days. Scenario: When an offer is made to a candidate, it is valid for only two days. Universal Containers would like to set up a time-dependent workflow rule that evaluates offers in a sent status, and sends a task to the offer owner to remind them to follow up with the candidate. Tasks:

LY

1. Create a workflow rule with time-dependent actions. 2. Create a new offer to test the process and monitor the time-based workflow queue. Time:

O N

15 minutes

SE

Instructions:

1. Create a workflow rule with time-dependent actions.

U

Click Setup | Create | Workflow & Approvals | Workflow Rules. When you see a splash page, click Continue. Click New Rule. Select Offer from the Select object picklist, and click Next. Configure rule:

AL

A. B. C. D. E.

IN

TE R

N

i. Rule Name: Submitted Offer Requires Attention ii. Description: If an offer has been sent, but no word from candidate in 2 days, have recruiter follow up. iii. Evaluate the rule when a record is: created, and anytime it’s edited to subsequently meet criteria. iv. Run this rule if the following: criteria are met: Status | equals | Sent F. Click Save & Next. G. Click Add Time Trigger. H. Select 2 | Days | After | Rule Trigger Date from the Workflow Rule picklists. I. Click Save. J. Under this Time Trigger, click Add Workflow Action | New Task. i. ii. iii. iv. v. vi.

Assigned To: Offer Owner (Click the lookup icon, select Owner from the Type picklist, and click Offer Owner to select.) Subject: Follow up on submitted offer Unique Name: Follow_up_on_submitted_offer (This field auto-populates.) Due Date: Rule Trigger Date | plus | (blank) days Notify Assignee: (selected) Status: Not Started ©Copyright 2013 salesforce.com, inc. All rights reserved. Building Applications with Force.com – Exercise Guide – Page 73 of 144

vii. Priority: High viii. Comments: Recruiting has not received a response to an offer submitted to a candidate. Please follow up with candidate. K. Click Save. L. Click Done. M. Click Activate. 2. Create a new offer to test the process and monitor the time-based workflow queue.

SE

Click Save. Monitor the time-based workflow queue. Click Setup | Monitor | Time-Based Workflow. Click Search.

U

D. E. F. G.

Offer Date: (today’s date) Offer Expiration Date: (today’s date + 2) Status: Sent Actual Salary: 45,000 Stock Options: 500 Bonus Percentage: 10

O N

i. ii. iii. iv. v. vi.

LY

A. Click the Job Applications tab. B. Click APP-0000. C. Scroll down to the Offers related list and click New Offer.

AL

Note the offer listed among the pending actions in the queue.

N

Review

IN

TE R

1. How can an administrator tell if a time-based workflow rule has fired?

2. What happens to an item in the time-based workflow queue if a record no longer meets the workflow criteria?

©Copyright 2013 salesforce.com, inc. All rights reserved. Building Applications with Force.com – Exercise Guide – Page 74 of 144

13-3: Set Up Time-Dependent Workflow (Optional) Goal: Create a workflow rule that will escalate positions if there are no interviewers after 30 days. Scenario: At Universal Containers, positions have interviewers associated with them. If a position has no interviewers attached to it after 30 days, an email should be sent to the position owner. Tasks:

LY

1. Create a new field to count the number of interviewers associated with a position. 2. Create a workflow rule with time-dependent actions. 3. Create a new position to test the process and monitor the time-based workflow queue. Time:

O N

15 minutes

SE

Instructions:

1. Create a new field to count the number of interviewers associated with a position.

Field Label: Number of Interviewers Field Name: Number_of_Interviewers (This field auto-populates.) Click Next. Summarized Object: Interviewers Select Roll-Up Type: Count Filter Criteria: All records should be included in the calculation

N

i. ii. iii. iv. v. vi.

AL

U

Click Setup | Create | Objects | Position. Under the Custom Fields & Relationships section, click New. Select the Roll-Up Summary radio button and click Next. Enter the custom field details.

TE R

A. B. C. D.

IN

E. Click Next. F. Set the field visible for the Custom-HR, Custom-Executive, Custom-Recruiter, and System Administrator profiles and click Next. G. Click Save to add the field to all position page layouts. 2. Create a workflow rule with time-dependent actions. A. B. C. D. E.

Click Setup | Create | Workflow & Approvals | Workflow Rules. If you see a splash page, click Continue. Click New Rule. Select Position from the Select object picklist, and click Next. Configure the new rule. i. Rule Name: Position has no Interviewers ii. Description: If a position has no interviewers after 30 days, an email will be sent to the position owner. iii. Evaluate rule when a record is: created, and anytime it’s edited to ©Copyright 2013 salesforce.com, inc. All rights reserved. Building Applications with Force.com – Exercise Guide – Page 75 of 144

subsequently meet criteria. iv. Run this rule if the following: criteria are met: Number of Interviewers | equals | 0 F. Click Save & Next. G. Click Add Time Trigger. H. Enter/select 30 | Days | After | Rule Trigger Date to amend the Workflow Rule, and click Save. I. Under Time-Dependent Workflow Actions, click Add Workflow Action, then select New Email Alert.

LY

iii. iv. v.

O N

ii.

Description: Email to Position Owner when there are no Interviewers Unique Name: Email_to_Position_Owner_when_there_are_no_Interviewers (This field auto-populates.) Email Template: Position with no Interviewers Recipient Type: Search: Owner Select Position Owner from the Available Recipients list and click Add to move it to the Selected Recipients list.

SE

i.

U

J. Click Save. K. Click Done. L. Click Activate.

AL

3. Create a new position to test the process and monitor the time-based workflow queue.

TE R

N

A. Click the Positions tab. B. Click New. C. Select Non-Technical Positions from the Record Type of new record picklist, and click Continue. 4. Enter details to edit the new position.

IN

i. Title: Collections Analyst ii. Type: Full Time iii. Department: Finance iv. Location: San Francisco v. Pay Grade: ACT – 100 vi. Hiring Manager: Frank Linstrom vii. Priority: Medium viii. Status: New ix. Job Description: The Collections Analyst is responsible for analyzing outstanding accounts and collecting outstanding balances. B. Click Save. C. Monitor the time-based workflow queue. i. Click Setup | Monitor | Time-Based Workflow. ii. Click Search. iii. Note the Collections Analyst position in the queue with an action pending from the ©Copyright 2013 salesforce.com, inc. All rights reserved. Building Applications with Force.com – Exercise Guide – Page 76 of 144

Position has no Interviewers rule. D. Add an interviewer to the Collections Analyst Position. i. ii. iii. iv.

Click the Positions tab. Click on the Collections Analyst. Scroll down to the Interviewers related list. Click New Interviewer. a. Role: General b. Employee: Tom Zales

v. Click Save.

LY

E. Monitor the time-based workflow queue.

IN

TE R

N

AL

U

SE

O N

i. Click Setup | Monitor | Time-Based Workflow. ii. Click Search. iii. Note the Collections Analyst position is no longer listed in the queue.

©Copyright 2013 salesforce.com, inc. All rights reserved. Building Applications with Force.com – Exercise Guide – Page 77 of 144

14-1: Create Multi-Step Approval Processes Goal: Create an approval process for approving new positions. Scenario: Universal Containers needs to make sure that all new positions receive the proper approval before they are posted.



Step 1: New positions should go to the manager of the hiring manager. Step 2: All positions approved by the hiring manager’s manager should go to the recruiter (Mario Ruiz). Step 3: Senior level positions should also be approved by the department VP.

LY

 

SE

Create a multi-step approval process. Create initial submission actions. Create approval steps. Create final approval actions. Create final rejection actions. Activate the rule. Create a new position to test the approval process.

U

1. 2. 3. 4. 5. 6. 7.

O N

Tasks:

Time:

IN

TE R

N

AL

30 minutes

©Copyright 2013 salesforce.com, inc. All rights reserved. Building Applications with Force.com – Exercise Guide – Page 78 of 144

LY O N SE U AL N TE R IN ©Copyright 2013 salesforce.com, inc. All rights reserved. Building Applications with Force.com – Exercise Guide – Page 79 of 144

Instructions: 1. Create a multi-step approval process. A. Click Setup | Create | Workflow & Approvals | Approval Processes. B. Select Position from the Manage Approval Processes For: picklist. C. Click Create New Approval Process | Use Standard Setup Wizard. i. Process Name: 3-Step Position Approval #1 ii. Unique Name: X3_Step_Position_Approval_1 (This field auto-populates.) iii. Description:

O N

LY

ALL New Positions: - Step 1: approval by Mgr of Hiring Mgr - Step 2: approval by Recruiter (Mario) - Step 3: senior-level ONLY approved by VP of Hiring Mgr (manually selected) D. Click Next. E. Specify the entry criteria as Use this approval process if the following: criteria are met: Status | equals | New, and click Next.

U

SE

i. Next Automated Approver Determined By: Manager ii. Use Approver Field of Position Owner: (selected) iii. Record Editability Properties: Administrators ONLY can edit records during the approval process.

AL

F. Click Next. G. Leave the Approval Assignment Email Template field blank, and click Next. i.

IN

TE R

N

Selected Fields: Title, Owner, Department, Hiring Manager, Job Description, Pay Grade, Priority, Type (Hold CTRL to select multiple fields.) ii. Display approval history information in addition to the fields selected above: (selected) iii. Allow approvers to access the approval page only from within the salesforce.com application. (Recommended): (selected) H. Click Next.

i. Allowed Submitters: Position Owner ii. Add the Approval History related list to Position page layouts: (selected) iii. Allow submitters to recall approval requests: (cleared) I. Click Save. J. Select No, I'll do this later, take me to the approval process detail page to review what I've just created. K. Click Go! 2. Create initial submission actions. A. Under the Initial Submission Actions related list, click Add New | Field Update. B. Enter the field update details. i.

Name: Sub-Status for Positions in Progress ©Copyright 2013 salesforce.com, inc. All rights reserved. Building Applications with Force.com – Exercise Guide – Page 80 of 144

ii. Unique Name: Sub_Status_for_Positions_in_Progress (This field autopopulates.) iii. Field to Update: Sub-Status iv. Picklist Options: A specific value: Pending C. Click Save. 3. Create approval steps. A. Under the Approval Steps related list, click New Approval Step. i. Name: Manager of Hiring Manager ii. Unique Name: Manager_of_Hiring_Manager (This field auto-populates.) iii. Step Number: 1

LY

B. Click Next. C. Select All records should enter this step., and click Next.

O N

i. Automatically assign using the user field selected earlier. (Manager): (selected) ii. The approver’s delegate may also approve this request: (cleared)

U

SE

D. Click Save. E. Select No, I'll do this later. Take me to the approval process detail page to review what I've just created, and click Go! F. Under the Approval Steps related list, click New Approval Step.

AL

i. Name: Recruiter ii. Unique Name: Recruiter (This field auto-populates.) iii. Step Number: 2

TE R

N

G. Click Next. H. Select All records should enter this step., and click Next. I. Select Automatically assign to approver(s)., then select User from the picklist that appears, and use the lookup icon to select Mario Ruiz. i.

IN

When multiple approvers are selected: Approve or reject based on the FIRST response. ii. The approver’s delegate may also approve this request.: (cleared) iii. What should happen if the approver rejects this request?: Perform all rejection actions for this step AND all final rejection actions. (Final Rejection) J. Click Save. K. Select No, I'll do this later. Take me to the approval process detail page to review what I've just created., and click Go! L. Under the Approval Steps related list, click New Approval Step. i. Name: VP of Hiring Manager for Sr-Level Positions ii. Unique Name: VP_of_Hiring_Manager_for_Sr_Level_Positions (This field auto-populates.) iii. Step Number: 3 M. Click Next. ©Copyright 2013 salesforce.com, inc. All rights reserved. Building Applications with Force.com – Exercise Guide – Page 81 of 144

N. Select Enter this step if the following: criteria are met: Pay Grade | contains | 300, 400 O. Click Next. i. Let the submitter choose the approver manually.: (selected) ii. The approver’s delegate may also approve this request.: (cleared) iii. Perform all rejection actions for this step AND all final rejection actions. (Final Rejection): (selected) P. Click Save. Q. Select No, I'll do this later. Take me to the approval process detail page to review what I've just created., and click Go!

LY

4. Create final approval actions. A. Under the Final Approval Actions related list, click Add New | Field Update.

O N

Name: Status to Open on Approval Unique Name: Status_to_Open_on_Approval (This field auto-populates.) Field to Update: Status Picklist Options: A specific value: Open

SE

i. ii. iii. iv.

B. Click Save & New.

U

Name: Sub-Status to Approved on Approval Unique Name: Sub_Status_to_Approved_on_Approval Field to Update: Sub-Status Picklist Options: A specific value: Approved

AL

i. ii. iii. iv.

TE R

Name: Owner to Recruiter Queue on Approval Unique Name: Owner_to_Recruiter_Queue_on_Approval Field to Update: Owner Owner: Queue: Recruiter Queue Notify Assignee: (cleared)

IN

i. ii. iii. iv. v.

N

C. Click Save & New.

D. Click Save & New. i. ii. iii. iv. v.

Name: Date Opened to Today Unique Name: Date_Opened_to_Today Field to Update: Date Opened Date Options: Use a formula to set the new value Formula: NOW()

E. Click Save. 5. Create final rejection actions. A. Under the Final Rejection Actions related list, click Add New | Field Update. i. Name: Status to Closed on Not Approved ii. Unique Name: Status_to_Closed_on_Not_Approved iii. Field to Update: Status ©Copyright 2013 salesforce.com, inc. All rights reserved. Building Applications with Force.com – Exercise Guide – Page 82 of 144

iv. Picklist Options: A specific value: Closed B. Click Save & New. i. ii. iii. iv.

Name: Sub-Status to Not Approved on Reject Unique Name: Sub_Status_to_Not_Approved_on_Reject Field to Update: Sub-Status Picklist Options: A specific value: Not Approved

C. Click Save. 6. Activate the rule.

O N

7. Create a new position to test the approval process.

LY

A. Click Activate. B. When you receive the popup that says, “After activating this approval process, you cannot add or remove approval steps. Also, some approval step attributes may not be editable. Continue?,” click OK.

SE

A. Click the Positions tab, then click New. B. Select Non-Technical Position from the Record Type of new record picklist, and click Continue. C. Edit the new position.

IN

TE R

N

AL

U

i. Title: Associate Support Representative ii. Type: Full Time iii. Department: Support iv. Location: San Francisco v. Pay Grade: S-100 vi. Hiring Manager: Ben Stuart vii. Priority: Medium viii. Status: New ix. Job Description: Associate Support Representatives are the front lines of customer support. They provide courteous and professional support to all kinds of issues that our customers present. D. Click Save. E. Change the owner by clicking [Change] next to the Owner field, keeping the Owner as User, and using the lookup icon to select Ben Stuart. F. Click Save. G. On the Approval History related list, click Submit for Approval. i. ii. iii. iv. v.

When you receive the popup that says, “Once you submit this record for approval, you might not be able to edit it or recall it from the approval process depending on your settings. Continue?,” click OK. Note that the record is routed to Andrew Goldberg. Log in as Andrew Goldberg to approve the position. Log out as Andrew Goldberg. Note that the record is then routed to Mario Ruiz.

©Copyright 2013 salesforce.com, inc. All rights reserved. Building Applications with Force.com – Exercise Guide – Page 83 of 144

14-2: Create Approval Processes that Skip Steps Goal: Modify the existing approval process to skip steps that are unnecessary. Scenario: Universal Containers would like all positions to be approved by the manager of the hiring manager. For senior-level positions, the position should then be approved by the department VP. After approval by the manager (and VP if necessary), positions should be routed to the recruiter. Tasks:

LY

1. Modify the existing multi-step approval process to change the order and skip the VP step if the position is not senior-level. 2. Deactivate the approval process, 3-Step Position Approval #1.

O N

Time:

IN

TE R

N

AL

U

SE

15 minutes

©Copyright 2013 salesforce.com, inc. All rights reserved. Building Applications with Force.com – Exercise Guide – Page 84 of 144

LY O N SE U AL N TE R IN ©Copyright 2013 salesforce.com, inc. All rights reserved. Building Applications with Force.com – Exercise Guide – Page 85 of 144

Instructions: 1. Modify the existing multi-step approval process to change the order and skip the VP step if the position is not senior-level. A. Click Setup | Create | Workflow & Approvals | Approval Processes. i. Manage Approval Processes For: Position ii. Click on the name of the process created in the last exercise, 3-Step Position Approval #1. B. Click Clone.

LY

i. Name: 3-Step Position Approval #2 ii. Unique Name: X3_Step_Position_Approval_2 (Change to 2 manually.) iii. Description:

SE

O N

ALL New Positions: - Step 1: approval by Mgr of Hiring Mgr - Step 2: senior-level ONLY approved by VP of Hiring Mgr (manually selected) - Step 3: approval by Recruiter (Mario)

AL

U

C. Click Save. D. When you see the popup that says, “Remember, you will not be able to use this approval process until it has been activated,” click OK. E. Under the Approval Steps related list, click Del next to Step Number 2 to delete it. F. When you see the pop-up, Are you sure?, click OK. G. On the Approval Steps related list, click New Approval Step.

TE R

N

i. Name: Recruiter ii. Unique Name: Recruiter (This field auto-populates.) iii. Step Number: 3

IN

H. Click Next. I. Select All records should enter this step., and click Next. J. Select the Assigned Approver. i. Automatically assign to approver(s).: (selected) ii. Select User and use the lookup icon to select Mario Ruiz. iii. When multiple approvers are selected: Approve or reject based on the FIRST response. iv. The approver’s delegate may also approve this request: (cleared) v. What should happen if the approver rejects this request?: Perform all rejection actions for this step AND all final rejection actions. (Final Rejection) K. Click Save. L. Select No, I’ll do this later. Take me to the approval process detail page to review what I’ve just created., and click Go! M. Find Step 2 and click Edit, then click Next. N. Select Enter this step if the following criteria are met, else go to next step. O. Click Save. ©Copyright 2013 salesforce.com, inc. All rights reserved. Building Applications with Force.com – Exercise Guide – Page 86 of 144

P. Click Activate. Q. Click OK when you receive the popup that says, “After activating this approval process, you cannot add or remove approval steps. Also, some approval step attributes may not be editable. Continue?” 2. Deactivate the approval process, 3-Step Position Approval #1.

Review

IN

TE R

N

AL

U

SE

O N

1. How do you create an approval process that skips steps?

LY

A. Click Setup | Create | Workflow & Approvals | Approval Processes. B. Click Deactivate next to 3-Step Position Approval #1. (You will then see 3-Step Position Approval #2 listed under Active Approval Processes, and 3-Step Position Approval #1 listed under Inactive Approval Processes, so that you know with certainty which processes are active.)

©Copyright 2013 salesforce.com, inc. All rights reserved. Building Applications with Force.com – Exercise Guide – Page 87 of 144

14-3: Create Parallel Approval Processes Goal: Create an approval process that sends approvals to two approvers in parallel. Scenario: All job applications should be approved by the recruiter and the Vice President of HR. Both approvals can take place at the same time. Tasks: Create a parallel approval process. Create initial submission actions. Add approval steps. Create final approval actions. Create final rejection actions.

LY

1. 2. 3. 4. 5.

O N

Time:

IN

TE R

N

AL

U

SE

15 minutes

©Copyright 2013 salesforce.com, inc. All rights reserved. Building Applications with Force.com – Exercise Guide – Page 88 of 144

Instructions: 1. Create a parallel approval process. A. Click Setup | Create | Workflow & Approvals | Approval Processes. B. Select Job Application from the Manage Approval Processes For: picklist. C. Click Create New Approval Process, then select Use Standard Setup Wizard.

LY

i. Process Name: Parallel Approvers for Job Application ii. Unique Name: Parallel_Approvers_for_Job_Application (This field autopopulates.) iii. Description: Recruiter and VP of HR must approve all job applications before they can advance to the offer stage; interviews must be complete before entry into approval.

O N

D. Click Next. E. Select criteria are met from the Use this approval process if the following picklist, then select:

SE

i. Status | equals | Open ii. Stage | equals | Interviews Completed F. Click Next.

AL

U

i. Next Automated Approver Determined By: --None-ii. Administrators ONLY can edit records during the approval process: (selected)

N

G. Click Next. H. Leave the Approval Assignment Email Template field blank, and click Next. i.

I.

IN

TE R

Selected Fields: Job Application Name, Owner, Position, Candidate, Name, Phone, Email, Average Review Score, Rating ii. Display approval history information in addition to the fields selected above: (selected) iii. Allow approvers to access the approval page only from within the salesforce.com application. (Recommended): (selected) Click Next.

i. Allowed Submitters: Job Application Owner ii. Add Approval History related list to all Job Application page layouts: (selected) iii. Allow submitters to recall approval requests: (cleared) J. Click Save. K. Select No, I’ll do this later, take me to the approval process detail page to review what I’ve just created, and click Go! 2. Create initial submission actions. A. Under Initial Submission Actions related list, click Add New | Field Update. i. Name: Status to In Approval ii. Unique Name: Status_to_In_Approval (This field auto-populates.) iii. Field to Update: Status ©Copyright 2013 salesforce.com, inc. All rights reserved. Building Applications with Force.com – Exercise Guide – Page 89 of 144

iv. Picklist Options: A specific value: In Approval B. Click Save. 3. Add approval steps. A. In the Approval Steps related list, click New Approval Step. i. Name: Approval by HR ii. Unique Name: Approval_by_HR iii. Step Number: 1 B. Click Next. C. Select All records should enter this step., and click Next.

SE

O N

LY

i. Automatically assign to approver(s).: (selected) ii. Select User from the picklist that appears, then use the lookup icon to select Megan Smith. iii. Click the Add Row link. iv. Select Related User, then Owner from the picklists that appear. v. When multiple approvers are selected: Require UNANIMOUS approval from all selected approvers. vi. The approver’s delegate may also approve this request: (cleared)

4. Create final approval actions.

AL

U

D. Click Save. E. Select No, I’ll do this later, take me to the approval process detail page to review what I’ve just created., and click Go!

Name: Stage to Preparing Offer Unique Name: Stage_to_Preparing_Offer Field to Update: Stage Picklist Options: A specific value: Preparing Offer

TE R

i. ii. iii. iv.

N

A. Under the Final Approval Actions related list, click Add New | Field Update.

i. ii. iii. iv.

IN

B. Click Save & New.

Name: Status to Approved Unique Name: Status_to_Approved Field: Status Picklist Options: A specific value: Approved

C. Click Save. D. Under the Final Approval Actions related list, click Add New | Task. i. ii. iii. iv. v. vi.

Assigned To: Job Application Owner (Click the lookup icon and select Owner from the Type picklist.) Subject: Notify candidate re: offer coming Unique Name: Notify_candidate_re_offer_coming Due Date: Rule Trigger Date: plus: 2 days Notify Assignee: (selected) Comments: Please inform the candidate via email/phone to expect ©Copyright 2013 salesforce.com, inc. All rights reserved. Building Applications with Force.com – Exercise Guide – Page 90 of 144

an offer letter! vii. Status: Not Started viii. Priority: Normal E. Click Save. 5. Create final rejection actions. A. Under the Final Rejection Actions related list, click Add New | Field Update. Name: Stage to Closed – Rejected Unique Name: Stage_to_Closed_Rejected Field to Update: Stage Picklist Options: A specific value: Closed – Rejected

B. Click Save & New. Name: Status to Closed Unique Name: Status_to_Closed Field to Update: Status Picklist Options: A specific value: Closed

O N

i. ii. iii. iv.

LY

i. ii. iii. iv.

IN

TE R

N

AL

U

SE

C. Click Save. D. Click Activate. E. When you receive the popup that says, “After activating this approval process, you cannot add or remove approval steps. Also, some approval step attributes may not be editable. Continue?,” click OK.

©Copyright 2013 salesforce.com, inc. All rights reserved. Building Applications with Force.com – Exercise Guide – Page 91 of 144

14-4: Create Outbound Messages Goal: Modify an existing approval process to send an outbound message to an external HR system. Scenario: When a job application is approved, it should trigger an outbound message to an external HR system as well as update fields and create a task in Salesforce. Tasks:

LY

1. Create an outbound message. 2. Submit a job application record to test the new process. 3. Monitor the outbound message queue. Time:

IN

TE R

N

AL

U

SE

O N

10 minutes

©Copyright 2013 salesforce.com, inc. All rights reserved. Building Applications with Force.com – Exercise Guide – Page 92 of 144

Instructions: 1. Create an outbound message A. B. C. D.

Click Setup | Create | Workflow & Approvals | Approval Processes. Select Job Application under the Manage Approval Processes For: picklist. Click Parallel Approvers for Job Application. Scroll down to the Final Approval Actions related list, and click Add New | Outbound Message.

O N

LY

i. Name: Approved Job App to HR System ii. Unique Name: Approved_Job_App_to_HR_System iii. Description: Send info re: candidate to internal HR system in anticipation of candidate accepting offer. iv. Endpoint URL: https://www.uc.com/internal-proc v. User to send as: Admin User vi. Send Session ID: (selected) vii. Selected Fields: Id, Average_Review_Score__c, Candidate__c, Email__c, Name__c, OwnerId, Phone__c, Position__c

SE

E. Click Save.

AL

A. Click the Job Applications tab. B. Click APP – 0000. C. Click Edit.

U

2. Submit a job application record to test the new process.

N

i. Status: Open ii. Stage: Interviews Completed

IN

TE R

D. Click Save. E. Change the owner by clicking [Change] next to Owner, then use the lookup icon to select Mario Ruiz. F. Click Save. G. Click Submit for Approval under the Approval History related list. H. Click OK when you receive the popup that says, “Once you submit this record for approval, you might not be able to edit it or recall it from the approval process depending on your settings. Continue?” I. Log in as Megan Smith to approve the record. J. Log out. K. Log in as Mario Ruiz to approve the record. L. Log out. M. After both users have approved the record, note the changes to Stage and Status, as well as the new Task. 3. Monitor the outbound message queue. A. Click Setup | Monitor | Outbound Messages. B. Note the message listed in the Next items for delivery related list. (The message will also be listed in the Oldest failures in queue related list because the endpoint is not a real application.)

©Copyright 2013 salesforce.com, inc. All rights reserved. Building Applications with Force.com – Exercise Guide – Page 93 of 144

14-5: Create Dynamic Approval Processes (Optional) Goal: Create a dynamic approval process. Scenario: At Universal Containers, not all approval processes route records to a particular user or manager. Universal Containers would like to have more flexibility with its approval processes (to refer to an approval matrix and route approvals based on users specified on the matrix). Tasks:

U

SE

O N

LY

1. Download the needed apex class and trigger. 2. Add new approver fields on the Position object. 3. Modify the Position Layout and Technical Position Layout to include a section for approver information. 4. Create an approval matrix in Salesforce. 5. Add fields to the Position Approval Matrix object. 6. Create a new position approval matrix. 7. Create an Apex trigger to automatically populate the Approver fields on new positions. 8. Populate approvers on a Position. 9. Modify the existing approval process to use this dynamic routing. 10. Test the new approval process. Time:

AL

30 minutes

N

Instructions:

Click the Documents tab. Select Shared Documents from the Folder picklist. Click the 401_Lab_Files.zip file. Click View File. In the File Download dialog box, click Save. In the Save As dialog box, select to save the file to the desktop, and click Save. Right-click the downloaded .zip file and select Extract All.

IN

A. B. C. D. E. F. G.

TE R

1. Download the needed apex class and trigger.

2. Add new approver fields on the Position object. A. B. C. D.

Click Setup | Create | Objects | Position. Under the Custom Fields & Relationships section, click New. Select the Lookup Relationship radio button under Data Type, and click Next. Select User from the Related To picklist, and click Next. i. Field Label: Approver #1 ii. Field Name: Approver_1

E. Click Next. F. Click Next to make the field visible to Custom – Executive, Custom – HR, Custom – Recruiter, and System Administrator profiles. ©Copyright 2013 salesforce.com, inc. All rights reserved. Building Applications with Force.com – Exercise Guide – Page 94 of 144

G. Click Save & New to add the field to the Position Layout and Technical Position Layout. H. Select the Lookup Relationship radio button under Data Type, and click Next. I. Select User from the Related To picklist, and click Next. i. Field Label: Approver #2 ii. Field Name: Approver_2

LY

J. Click Next. K. Click Next to make the field visible to Custom – Executive, Custom – HR, Custom – Recruiter, and System Administrator profiles. L. Click Save & New to add the field to the Position Layout and Technical Position Layout. M. Select the Lookup Relationship radio button under Data Type, and click Next. N. Select User from the Related To picklist, and click Next.

O N

i. Field Label: Approver #3 ii. Field Name: Approver_3

SE

O. Click Next. P. Click Next to make the field visible to Custom – Executive, Custom – HR, Custom – Recruiter, and System Administrator profiles. Q. Click Save to add the field to the Position Layout and Technical Position Layout.

U

3. Modify the Position Layout and Technical Position Layout to include a section for approver information.

TE R

Section Name: Position Approvers Display Section Header On: Detail Page and Edit Page (both selected) Layout: 2-Column Tab-key Order: Left-Right Click OK. Drag the Approver #1, Approver #2, and Approver #3 fields from the Information section into the new Position Approvers section.

IN

i. ii. iii. iv. v. vi.

N

AL

A. Click Setup | Create | Objects | Position. B. Under the Page Layouts related list, click the Edit link next to Position Layout. C. Drag a new section from the palette at the top onto the page layout, placing it above the Information section. Make the following changes to the Section Properties:

D. Click Save. E. Under the Page Layouts related list, click the Edit link next to Technical Position Layout. F. Click Create New Section. i. ii. iii. iv. v.

Name: Position Approvers Columns: 2 (Double) Click OK. Drag the Position Approvers section above the System Information section. Drag the Approver #1, Approver #2, and Approver #3 fields into the new Position Approvers section.

G. Click Save. 4. Create an approval matrix in Salesforce.

©Copyright 2013 salesforce.com, inc. All rights reserved. Building Applications with Force.com – Exercise Guide – Page 95 of 144

A. Click Setup | Create | Objects. B. Click New Custom Object. i. ii. iii. iv.

I. J. K.

SE

U

AL

N

G. H.

Click Save. Use the lookup icon to select any tab style. Click Next. Select the Apply one tab visibility to all profiles: Default Off radio button. Select the Apply a different tab visibility for each profile radio button. Select Default On for the Custom-Executive, Custom-HR, Custom – Recruiter, and System Admin profiles. Click Next. Add the tab only to the Recruiting app. Click Save.

TE R

C. D. E. F.

O N

LY

Label: Position Approval Matrix Plural Label: Position Approval Matrices Object Name: Position_Approval_Matrix (This field auto-populates.) Context-Sensitive Help Setting: Open the standard Salesforce.com Help & Training window (selected) v. Record Name: Routing ID vi. Data Type: Auto Number vii. Display Format: RoutingID – {0000} viii. Starting Number: 1 ix. Allow Reports: (selected) x. Allow Activities: (selected) xi. Track Field History: (selected) xii. Deployed: (selected) xiii. Add Notes and Attachments related list to default page layout: (cleared) xiv. Launch New Custom Tab Wizard after saving this custom object: (selected)

5. Add fields to the Position Approval Matrix object.

IN

A. Under the Custom Fields & Relationships related list, click New. B. Select the Lookup Relationship radio button under Data Type, and click Next. C. Select User from the Related To picklist, and click Next. i. Field Label: Approver #1 ii. Field Name: Approver_1 D. Click Next. E. Set the field visible for the Custom-HR, Custom-Executive, Custom-Recruiter and System Administrator profiles and click Next. F. Click Save & New to add the field to the page layout. G. Select the Lookup Relationship radio button under Data Type, and click Next. H. Select User from the Related To picklist, and click Next. i. Field Label: Approver #2 ii. Field Name: Approver_2 I.

Click Next. ©Copyright 2013 salesforce.com, inc. All rights reserved. Building Applications with Force.com – Exercise Guide – Page 96 of 144

J. Set the field visible for the Custom-HR, Custom-Executive, Custom-Recruiter, and System Administrator profiles, and click Next. K. Click Save & New to add the field to the page layout. L. Select the Lookup Relationship radio button under Data Type, and click Next. M. Select User from the Related To picklist, and click Next. i. Field Label: Approver #3 ii. Field Name: Approver_3

O N

Field Label: Department Values: Engineering Finance IT Sales Support Field Name: Department (This field auto-populates.)

SE

i. ii. iii. iv. v. vi. vii.

LY

N. Click Next. O. Set the field visible for the Custom-HR, Custom-Executive, Custom-Recruiter and System Administrator profiles and click Next. P. Click Save & New to add the field to the page layout. Q. Select the Picklist radio button under Data Type, and click Next.

N

AL

U

R. Click Next. S. Set the field visible for the Custom-HR, Custom-Executive, Custom-Recruiter, and System Administrator profiles, and click Next. T. Click Save & New to add the field to the page layout. U. Select the Picklist radio button under Data Type, and click Next.

IN

TE R

i. Field Label: Priority ii. Values: Critical High Medium Low iii. Field Name: Priority (This field auto-populates.) V. Click Next. W. Set the field visible for the Custom-HR, Custom-Executive, Custom-Recruiter and System Administrator profiles and click Next. X. Click Save & New to add the field to the page layout. Y. Select the Text radio button under Data Type, and click Next. i. Field Label: Routing Key ii. Length: 200 iii. Field Name: Routing_Key (This field auto-populates.) Z. Click Next. AA.Set the field visible for the Custom-HR, Custom-Executive, Custom-Recruiter, and System Administrator profiles, and click Next. BB.Click Save to add the field to the page layout.

©Copyright 2013 salesforce.com, inc. All rights reserved. Building Applications with Force.com – Exercise Guide – Page 97 of 144

6. Create a new position approval matrix. A. Click on the Position Approval Matrices tab. (Click + to see more tabs, if necessary.) B. Click New, then use the lookup icon to select the approvers. i. ii. iii. iv. v. vi.

Approver #1: Ben Stuart Approver #2: Andrew Goldberg Approver #3: Cynthia Capobianco Department: Engineering Priority: Medium Routing Key: (cleared)

C. Click Save.

LY

7. Create an Apex trigger to automatically populate the Approver fields on new positions.

AL

8. Populate approvers on a Position.

U

SE

O N

A. Navigate to \M14_Approval ProcessesExerciseFiles\ ApexClass.txt B. Open the file ApexClass.txt, copy all of the contents in the file, then navigate to Setup | Develop | Apex Classes | New. C. Paste the contents from the file into the entry screen, then click Save. D. Navigate to \M14_Approval ProcessesExerciseFiles\ ApexTrigger.txt E. Open the file ApexTrigger.txt, copy the entire contents of the file, then navigate to Setup | Create | Objects | Position. F. Scroll down to the Triggers related list, and click New. G. Remove all existing text, then paste the trigger and click Save.

TE R

N

A. Click the Positions tab. B. Click New. C. Select Technical Position from the Record Type of new record picklist, and click Continue.

IN

i. Title: Usability Tester ii. Type: Full Time iii. Department: Engineering iv. Location: San Francisco v. Pay Grade: ENG-200 vi. Hiring Manager: Andy Macrola vii. Priority: Medium viii. Status: New ix. Job Description: Test our product to make sure users can use it. D. Click Save. Note that the Approver fields are automatically populated based on the Position Approval Matrix. 9. Modify the existing approval process to use this dynamic routing. A. B. C. D.

Click Setup | Create | Workflow & Approvals | Approval Processes. Select Position from the Manage Approval Processes For: picklist. Click on 3-Step Position Approval #2. Scroll down to the Approval Steps section. ©Copyright 2013 salesforce.com, inc. All rights reserved. Building Applications with Force.com – Exercise Guide – Page 98 of 144

E. Next to Step 1, click Edit. F. Click Next, then Next again. i. Select the Automatically assign to approver(s) radio button from the list. ii. Select Related User from the picklist that appears, then use the lookup icon to select Approver #1. G. Click Save. H. Repeat to make Approver #2 the designated approver of Step 2, and Approver #3 the designated approver of Step 3. 10. Test the new approval process.

TE R

N

AL

U

SE

O N

LY

Click the Positions tab, then click on the position Usability Tester. Click Submit for Approval under the Approval History related list. Click OK. Who is the position routed to?

IN

A. B. C. D.

©Copyright 2013 salesforce.com, inc. All rights reserved. Building Applications with Force.com – Exercise Guide – Page 99 of 144

15-1: Create a Flow Goal: Create a flow using Visual Workflow. Scenario: Universal Containers is seeing a number of candidate records missing information. They want a candidate wizard created that includes all the needed information to complete the record. Tasks: Create a flow. Add a screen element to prompt for the candidate’s name. Set the start element for the flow. Add a screen element to prompt for the candidate’s contact information. Add a screen element to prompt for the candidate’s experience and education. 6. Add a record create element to create a new candidate record. 7. Add a screen element to finish the wizard. 8. Save and run the flow.

SE

O N

LY

1. 2. 3. 4. 5.

Time:

AL

U

40 minutes Instructions:

N

1. Create a flow.

TE R

A. Click Setup | Create | Workflow & Approvals | Flows. B. Click New Flow. The Welcome to Cloud Flow Designer screen opens displaying an overview video. Click Close to close the screen. 2. Add a screen element to prompt for the candidate's name. Drag and drop Screen from the palette onto the flow window. In the Name field, enter Candidate Name. (The Unique Name field auto-populates.) Click the Add a Field tab. Double-click the Textbox input type twice to add two textbox fields to the screen. Click the top textbox field and enter First Name as the label. (The Unique Name field auto-populates.) F. Click the other textbox field and enter Last Name as the label. (The Unique Name field auto-populates.) G. Click OK to complete the screen element.

IN

A. B. C. D. E.

3. Set the start element for the flow. A. Hover over the Candidate Name element. B. Click the Set as Start Element icon. C. Click Save and save the flow with the name Candidate Wizard. Click OK on the General Warning screen.

©Copyright 2013 salesforce.com, inc. All rights reserved. Building Applications with Force.com – Exercise Guide – Page 100 of 144

4. Add a screen element to prompt for the candidate’s contact information. A. B. C. D.

Drag and drop Screen from the palette. Name the element: Candidate's Contact Information Add three textbox input fields. Configure the fields: Field Type

Label

Unique Name

Textbox

Phone

Phone

Textbox

Mobile Phone

Mobile_Phone

Textbox

Email Address

Email_Address

O N

LY

E. Click OK to complete the screen element. F. Connect the Candidate Name element to the Candidate Contact Information element. G. Click Save. 5. Add a screen element to prompt for the candidate’s experience and education.

SE

A. Drag and drop Screen from the palette. B. Name the element: Experience and Education C. Add the following fields. Label

Unique Name

Number

Years of Experience

Years_of_Experience

Checkbox

Currently Employed

Currently_Employed

Textbox

Current Employer

Current_Employer

N

AL

U

Field Type

TE R

D. Add a multi-select picklist field.

IN

i. Add a multi-select picklist field. ii. In the Label field, enter Education. (The Unique Name field auto-populates.) iii. Select Create New | Choice from Choice Settings. iv. Enter GED/HS Diploma as the Label. (The Unique Name field auto-populates.) v. Make sure Text is selected as the Value Data Type. vi. Enter GED/HS Diploma as the Stored Value and click OK. vii. Click Add Choice 6 times to add 6 other choices. viii. Repeat steps iii–v for each of the choices with the following name and stored values: Choice Name

Stored Value

BA/BS

BA/BS

MA/MS/MBA

MA/MS/MBA

MD

MD

JD

JD

PhD

PhD

Post Doc

Post Doc

©Copyright 2013 salesforce.com, inc. All rights reserved. Building Applications with Force.com – Exercise Guide – Page 101 of 144

E. Click and drag the Education field so that it is below the Years of Experience field and above the Currently Employed field. F. Click OK to complete the screen element. G. Connect the Candidate's Contact Information element to the Experience and Education element. H. Click Save. 6. Add a record create element to create a new candidate record. Drag and drop Record Create from the palette onto the flow window. Name the element Create Candidate. (The Unique Name field auto-populates.) Select the Candidate object from the Custom section of the Create picklist. Configure the fields and associated values: Values

First_Name__c

Screen Input Fields | First_Name

Last_Name__c

Screen Input Fields | Last_Name

Phone__c

Screen Input Fields | Phone

Mobile__c

Screen Input Fields | Mobile_Phone

Email__c

Screen Input Fields | Email_Address

Education__c

Screen Multi-Select Fields | Education

Currently_Employed__c

Screen Input Fields | Currently_Employed

Current_Employer__c

Screen Input Fields | Current_Employer

U

SE

O N

LY

Field

AL

A. B. C. D.

Screen Input Fields | Years_of_Experience

N

Years_of_Experience__c

IN

TE R

E. Click OK. F. Click and drag an arrow connector from the Experience and Education element to the Record Create element to connect the elements together. G. Click Save. 7. Add a screen element to finish the wizard. A. Drag and drop Screen from the palette onto the flow window. B. In the Name field, enter Candidate Created. (The Unique Name field autopopulates.) C. Add a display text field. D. Name the display text field: CandidateCreated E. Enter this message in the field: The candidate you entered, {!First_Name} {!Last_Name}, has been created. Use the Select Resource picklist to enter the {!First_Name} {!Last_Name} screen input fields. F. Click OK. G. Connect the Create Candidate element to the Candidate Created element. ©Copyright 2013 salesforce.com, inc. All rights reserved. Building Applications with Force.com – Exercise Guide – Page 102 of 144

H. Click Save. 8. Run the flow. A. Click Run. B. Enter the candidate information into the corresponding fields:

LY

i. First Name: John ii. Last Name: Smith iii. Phone: 4155551234 iv. Mobile Phone: (leave blank) v. Email: (leave blank) vi. Years of Experience: 3 vii. Education: BA/BS viii. Currently Employed: (selected) ix. Current Employer: XYZ labs

IN

TE R

N

AL

U

SE

O N

C. Click Finish and close the flow browser tab. D. Click Close to exit the Flow Designer. E. Navigate to the existing candidates and verify that John Smith is listed as a candidate.

©Copyright 2013 salesforce.com, inc. All rights reserved. Building Applications with Force.com – Exercise Guide – Page 103 of 144

15-2: Create a New Version of a Flow Goal: Create a flow using Visual Workflow. Scenario: Universal Containers is also seeing a number of duplicate candidate records being created. They want to add a record lookup to the candidate wizard to check if the candidate is already in the system based on their name.

Time:

Instructions:

O N

TE R

1. Open an existing flow.

N

AL

40 minutes

Click Setup | Create | Workflow & Approvals | Flows. Select All Flows from the View picklist. Click the Candidate Wizard link. Click Open next to version 1 of the flow.

IN

A. B. C. D.

SE

U

1. Open an existing flow. 2. Add a record lookup element to check if the candidate exists. 3. Save a new version of the flow. 4. Add a decision element based on the lookup element. 5. Add a screen element to display faults for data elements. 6. Save and run the flow.

LY

Tasks:

2. Add a record lookup element to check if the candidate exists. A. B. C. D.

Drag and drop Record Lookup from the palette onto the flow window. In the Name field, enter Candidate Check. (The Unique Name field auto-populates.) Select the Candidate object from the Custom section of the Lookup picklist. Enter two lookup filters: Field

Operator

Value

First_Name__c

Equals

Screen Input Fields | First_Name

Last_Name__c

Equals

Screen Input Fields | Last_Name

E. Create a new variable: i. Select Standard | Id as the field in the Field picklist. ii. Select Create New | Variable from the Variable picklist. ©Copyright 2013 salesforce.com, inc. All rights reserved. Building Applications with Force.com – Exercise Guide – Page 104 of 144

iii. Enter ExistCandidateID as the UniqueName. iv. Click OK to complete the variable. F. Click OK to complete the lookup element. G. Delete the connector between the Candidate Name element and the Candidate's Contact Information element by selecting the connector and pressing the Delete key. H. Click and drag an arrow connector from the Candidate Name element to the Candidate Check element to connect the elements together. 3. Save a new version of the flow.

4. Add a decision element based on the lookup element.

LY

A. Click Save As. B. Select New Version from the Save As picklist. C. Click OK.

O N

A. Drag and drop Decision from the palette onto the flow window. B. Enter Candidate Exists as the name. (The Unique Name field auto-populates.) C. Configure the Editable Outcome: Enter Candidate Already in System as the Editable Outcome name. (The Unique Name field auto-populates.) ii. Configure the resource row:

SE

i.

Operator Value

Record Lookup | Candidate Check

Equals

AL

U

Resource

Global Constant| $GlobalConstant.True

D. Configure the Default Outcome:

TE R

N

i. Click Default Outcome. ii. Enter Candidate Does Not Exist as the name. E. Click OK. F. Connect the Record Lookup element to the Candidate Exists element. G. Add a screen to tell the user the candidate already exists:

IN

i. Drag and drop Screen from the palette onto the flow window. ii. In the Name field, enter Candidate Already Exists. (The Unique Name field auto-populates.) iii. Click the Add a Field tab. iv. Double-click Display Text. v. Double-click on the Display Text field and enter ExistsMessage at the name. vi. Add the message A Candidate with that name already exists. Please enter a different name. in the text field and click OK. H. Connect the Decision element to the Candidate Already Exists element. I. Select the Candidate Already in System outcome. J. Connect the Candidate Already Exists element to the Candidate Name element to request that the user enter a different name. K. Connect the Decision element to the Candidate's Contact Information element. L. Click Save.

©Copyright 2013 salesforce.com, inc. All rights reserved. Building Applications with Force.com – Exercise Guide – Page 105 of 144

5. Add a screen element to display faults for data elements. Drag and drop Screen from the palette onto the flow window. Name the element: Display Faults Add a display text field. Name the display text field: Display_Fault_Message From the Select Resource picklist, select SYSTEM | $Flow.FaultMessage. Click OK. Connect the Candidate Check and Create Candidate element to the Display Faults element. H. Click Save. Your flow should match the flow below.

IN

TE R

N

AL

U

SE

O N

LY

A. B. C. D. E. F. G.

©Copyright 2013 salesforce.com, inc. All rights reserved. Building Applications with Force.com – Exercise Guide – Page 106 of 144

6. Run the flow. A. Click Run. B. Enter an existing candidate first and last name. (For example, John Smith was added in a previous exercise.) C. Does a message that the candidate already exists display?

IN

TE R

N

AL

U

SE

O N

LY

D. Close the flow browser tab. E. Click Close to exit the Flow Designer.

©Copyright 2013 salesforce.com, inc. All rights reserved. Building Applications with Force.com – Exercise Guide – Page 107 of 144

15-3: Deploy a Flow Goal: Create a custom button on the candidate list view to run the candidate flow. Scenario: Universal Containers would like to be able to launch the candidate wizard from the candidate list view. Tasks: Activate the flow version. Deploy the flow using a custom button. Modify the Recruiting and HR profile to give them the Run Flows permission. Run the flow.

LY

1. 2. 3. 4.

O N

Time: 10 minutes

SE

Instructions: 1. Activate the flow version.

U

Click Setup | Create | Workflow & Approvals | Flows. Select All Flows from the View picklist. Click on the Candidate Wizard flow. Click Activate next to version 2 of the Candidate Wizard flow.

AL

A. B. C. D.

F. G. H. I. J. K. L. M. N.

TE R

Click Create | Objects | Candidate. Scroll down to the Buttons, Links, and Actions section, and click New Button or Link. In the Label field, enter Candidate Wizard. (The Name field auto-populates.) Select the List Button radio button. From the Behavior picklist, select Display in existing window without sidebar or header. From the Content Source picklist, select URL. Scroll down to the text area below the field selection controls box and enter the following URL without any spaces: /flow/Candidate_Wizard?retURL=/home/home.jsp Click Check Syntax. Click Save. Click OK. Click Create | Objects | Candidate. Click Edit next to Candidate List View Search Layout. Move the Candidate Wizard button from the Available buttons column to the Selected Buttons column. Click Save.

IN

A. B. C. D. E.

N

2. Deploy the flow using a custom button.

©Copyright 2013 salesforce.com, inc. All rights reserved. Building Applications with Force.com – Exercise Guide – Page 108 of 144

3. Modify the Recruiting and HR profile to grant the Run Flows permission. A. B. C. D.

Navigate to Setup | Manage Users | Profiles | Custom – Recruiter. Select System Permissions and click Edit. Select Run Flows and click Save. Repeat these steps for the Custom – HR profile.

4. Run the flow.

TE R

N

AL

U

SE

O N

LY

Click the Candidates tab. Click GO!. Click Candidate Wizard. Enter sample data in the wizard. Verify that the new candidate record was created.

IN

A. B. C. D. E.

©Copyright 2013 salesforce.com, inc. All rights reserved. Building Applications with Force.com – Exercise Guide – Page 109 of 144

16-1: Audit Changes Using Setup Audit Trail Goal: View the Setup Audit Trail. Scenario: Universal Containers needs to be able to track all changes to Salesforce. Tasks: 1. View the Setup Audit Trail. 2. Create a new field to see how it appears in the Setup Audit Trail. 3. View the addition of the Drivers License Number field in Setup Audit Trail.

LY

Time:

O N

10 minutes

Instructions:

SE

1. View the Setup Audit Trail.

U

A. Click Setup | Security Controls | View Setup Audit Trail. B. View the entries for the changes that you have made to the application so far. 2. Create a new field to see how it appears in the Setup Audit Trail.

N

AL

A. Click Setup | Create | Objects | Candidate. B. Scroll down to the Custom Fields & Relationships related list, and click New. C. Select the Text radio button from the Data Type picklist, and click Next.

TE R

i. Field Label: Drivers License Number ii. Length: 30 iii. Field Name: Drivers_License_Number (This field auto-populates.)

IN

D. Click Next. E. Set the field visible for the Custom-HR, Custom-Executive, Custom-Recruiter, and System Administrator profiles, and click Next. F. Click Save to add the field to the Candidate Layout. 3. View the addition of the Drivers License Number field in Setup Audit Trail. A. Click Setup | Security Controls | View Setup Audit Trail. B. View the new entries for the creation of the new field.

©Copyright 2013 salesforce.com, inc. All rights reserved. Building Applications with Force.com – Exercise Guide – Page 110 of 144

16-2: Audit Changes to Data Goal: Set up field history tracking to track changes to specified fields. Scenario: Universal Containers needs to be able to track changes to any field on reviews. Tasks: 1. Select the fields on which to track history. 2. Add the Review History related list to the page layout. 3. View the field history tracking at work.

LY

Time:

O N

10 minutes

1. Select the fields on which to track history.

U

Click Setup | Create | Objects | Review. In the Custom Fields & Relationships related list, click Set History Tracking. Select all fields. Click Save.

AL

A. B. C. D.

SE

Instructions:

2. Add the Review History related list to the page layout.

N

Scroll down to the Page Layouts section, and click the Edit link next to Review Layout. On the palette, click the Related Lists category. Drag Review History and drop it at the bottom of the page. Click Save. Click Yes when you see the Overwrite Users’ Related List Customizations? pop-up.

TE R

A. B. C. D. E. A. B. C. D.

IN

3. View the field history tracking at work. Click the Reviews tab. Click on any review. Click Edit. In the Alternate Position field, enter: May also be a good fit for the Associate Developer position. E. Click Save. F. Note the change in the Review History related list.

©Copyright 2013 salesforce.com, inc. All rights reserved. Building Applications with Force.com – Exercise Guide – Page 111 of 144

17-1: Mass Transfer Ownership of Records Goal: Utilize the mass transfer records feature of the Force.com platform to assign proper ownership of records. Scenario: Universal Containers (UC) realizes that the recruiting data loaded into its Recruiting App has been assigned to the wrong owner. The company needs to clean up the ownership without executing an additional data load. Tasks:

LY

Use the mass transfer records feature to assign all positions, job applications, candidates, and offers to Phil Katz.

O N

Time: 10 minutes

SE

Instructions:

N

Click Setup | Data Management | Mass Transfer Records | Transfer Positions. Transfer from: User Transfer to: Phil Katz Click Find. Select all positions. Click Transfer.

TE R

i. ii. iii. iv. v. vi.

AL

A. Assign all positions to Phil Katz.

U

1. Use the mass transfer records feature to assign all positions, job applications, candidates, and offers to Phil Katz.

Review

IN

B. Repeat Step A for all candidates, job applications, and offers.

1. Is it possible to specify a record owner via a data input file so that we could avoid having to do the mass transfer records step?

©Copyright 2013 salesforce.com, inc. All rights reserved. Building Applications with Force.com – Exercise Guide – Page 112 of 144

17-2: Upload Positions Goal: Upload the records from the positions.csv file into Salesforce. Scenario: Universal Containers would like to load legacy recruiting data into the Recruiting App. Tasks: 1. Download the legacy position data. 2. Upload the legacy position records. 3. Go into the app and view some of the positions you have uploaded.

LY

Time:

O N

15 minutes

1. Download the legacy position data.

SE

Instructions:

N

AL

Click the Documents tab. Select Shared Documents from the Folder picklist. Click the 401_Lab_Files.zip file. Click View File. In the File Download dialog box, click Save. In the Save As dialog box, select to save the file to the desktop, and click Save. Right-click the downloaded .zip file and select Extract All.

TE R

A. B. C. D. E. F. G.

U

If you completed "Exercise 14-5: Creating Dynamic Approval Processes (Optional)" you already downloaded the needed exercise files and do not need to complete this step.

2. Upload the legacy position records.

IN

A. Double-click the Apex Data Loader icon on the desktop. If the Data Loader is not already installed, download it from Setup | Data Management | Data Loader. B. Click Upsert. C. Log in by entering your Username and Password. i. Click Login. ii. Click Next when you see the "Login completed successfully" message. D. Select Position from the list of objects. E. Select the Positions.csv file. i. Click Browse. ii. Browse to Positions.csv (in the M17_DataManagementExerciseFiles folder of the Lab_Files_401.zip file) and click Open. iii. Click Next. A message saying “Initialization Succeeded. Your operation will contain 14 records” will appear. ©Copyright 2013 salesforce.com, inc. All rights reserved. Building Applications with Force.com – Exercise Guide – Page 113 of 144

iv. Click OK. F. Select Legacy_Position_Number__c as the key field to use with the Position__c field and click Next. G. Select Legacy_Employee_Num__c as the key field to use with the Hiring_Manager__r field. H. Leave all others blank and click Next. I. Create and save the mapping file for the position object.

O N

LY

i. Click Create or Edit a Map. ii. Click Auto-Match Fields to Columns. iii. Verify that the correct columns from the Positions.csv file are matched to the correct fields. Notice that the Legacy_Employee_Num__c column is not matched. iv. Drag and drop the Hiring_Manager__r:Legacy_Employee_Num__c to the Legacy_Employee_Num__c column. v. Click Save Mapping. vi. Browse to the Mapping Files directory. vii. Type PositionMapping as the file name and click Save.

SE

J. Click OK. K. Click Next. L. Select the directory where your success and error files will be saved.

AL

U

i. Click Browse. ii. Select Desktop. iii. Click OK.

TE R

N

M. Click Finish. You should see the following message: "You have chosen to add new records and/or update existing records. The action you are about to take cannot be undone. Are you sure you want to proceed?" N. Click Yes. O. Click View Successes. P. Click Close. Q. In the Operation Finished dialog box of the data loader, click OK. A. B. C. D.

IN

3. Go into the app and view some of the positions you have uploaded. From the Force.com App Menu, select Recruiting. Click the Positions tab. From the View picklist, select All, and click Go! Find some of the positions you just inserted.

©Copyright 2013 salesforce.com, inc. All rights reserved. Building Applications with Force.com – Exercise Guide – Page 114 of 144

Review 1. Who is the owner of the position record you just loaded? Why?

O N

LY

2. What record type was assigned for the position record you just loaded? Why?

IN

TE R

N

AL

U

SE

3. How could you control the record type that is assigned for the positions you load?

©Copyright 2013 salesforce.com, inc. All rights reserved. Building Applications with Force.com – Exercise Guide – Page 115 of 144

17-3: Upsert Candidates Goal: Insert the Candidate records via the Data Loader GUI tool. Scenario: Universal Containers would like to load legacy recruiting data into the Recruiting App while limiting the possibility of creating duplicate records. Tasks: 1. Upsert the candidate data from the Candidates.csv file into Salesforce. 2. Go into the app and view some of the candidates you have inserted.

LY

Time:

O N

10 minutes

Instructions:

SE

1. Upsert the candidate data from the Candidates.csv file into Salesforce.

U

A. Double-click the Apex Data Loader icon on the desktop. B. Click Upsert. C. If needed, log in by entering your Username and Password.

AL

i. Click Log in. ii. Click Next when you see the "Login completed successfully" message.

TE R

Click Browse. Browse to Candidates.csv and click Open. Click Next. A message saying “Initialization Succeeded. Your operation will contain 11 records” appears. v. Click OK.

IN

i. ii. iii. iv.

N

D. Select Candidate from the list of objects. E. Select the Candidates.csv file.

F. Select Legacy_Candidate_Number__c as the matching field so the data is matched using the legacy system ID. G. Click Next. H. Select the related objects to create the relationships in the data. i. Select Legacy_Employee_Num__c as the CreatedBy field. ii. Select Legacy_Employee_Num__c as the LastModifiedBy field. I. J. K. L.

Click Choose an Existing Map. Select the CandidateMapping.sdl file from the Mapping File folder and click Open. Click Next. Select the directory where your success and error files will be saved. i. Click Browse. ii. Select Desktop. ©Copyright 2013 salesforce.com, inc. All rights reserved. Building Applications with Force.com – Exercise Guide – Page 116 of 144

iii. Click OK. M. Click Finish. You should see the following message: "You have chosen to add new records and/or update existing records. The action you are about to take cannot be undone. Are you sure you want to proceed?" N. Click Yes. O. Click View Successes. P. Click Close. Q. In the Operation Finished dialog box of the data loader, click OK. From the Force.com App Menu, select Recruiting. Click the Candidates tab. From the View picklist, select All, and click Go! Find some of the candidates you just inserted.

O N

A. B. C. D.

LY

2. Go into the app and view some of the candidates you have inserted.

Review

IN

TE R

N

AL

U

SE

1. When is it appropriate to use the Import Wizard vs. the Data Loader?

©Copyright 2013 salesforce.com, inc. All rights reserved. Building Applications with Force.com – Exercise Guide – Page 117 of 144

17-4: Upsert Remaining Object Data (Optional) Goal: Upsert the remaining legacy records via the Data Loader GUI tool. Scenario: Universal Containers would like to load the rest of the legacy recruiting data into the Recruiting App. Task: Execute an upsert of the legacy records via the Data Loader using existing mapping files.

LY

Time:

O N

10 minutes

Instructions:

IN

TE R

N

AL

U

SE

Execute an upsert for the remaining objects in the recruiting app (Job Applications, Interviewers, Reviews, and Offers) using the mapping files in the Mapping Files folder of datamanagement.zip.

©Copyright 2013 salesforce.com, inc. All rights reserved. Building Applications with Force.com – Exercise Guide – Page 118 of 144

18-1: Which is Best Solved Using Visualforce? Goal: Determine if these scenarios are best solved using Visualforce. Tasks: Review each scenario and determine if Visualforce would be the best solution. Time: 15 minutes

LY

Instructions:

U

SE

O N

1. The sales team would like to have a map displaying the company location on the Account page.

TE R

N

AL

2. The sales team would like to include a Chatter feed about the record on the Contact page.

IN

3. The recruiting team would like the Programming Languages field to display only when the department is specified as Engineering on a job application.

4. The recruiting team would like the Job Applications related list to be the only related list displayed on the Candidate record.

©Copyright 2013 salesforce.com, inc. All rights reserved. Building Applications with Force.com – Exercise Guide – Page 119 of 144

5. The Candidate object has a lot of fields and requires scrolling to see all the information. The recruiting team would like every section and related list to display as an individual tab that can be viewed when clicked on.

IN

TE R

N

AL

U

SE

O N

LY

6. The recruiting team would like the candidate list view to match the look and feel of the employee referral web page.

©Copyright 2013 salesforce.com, inc. All rights reserved. Building Applications with Force.com – Exercise Guide – Page 120 of 144

18-2: Create a Visualforce Page Goal: Create and save the Offer Quick Edit Visualforce page. Scenario: The Universal Containers recruiting team needs a fast way to update the expiration data and status for offers. Tasks: 1. Perform the one-time setup steps to create Visualforce pages. 2. Create the Offer Quick Edit Visualforce page.

LY

Time:

O N

10 minutes

Instructions:

SE

1. Perform the one-time setup steps to create Visualforce pages.

AL

U

A. Navigate to Your Name | My Settings | Personal | Advanced User Details in Salesforce. B. Click Edit. C. Select the Development Mode checkbox to enable the Inline Editor. D. Click Save.

N

2. Create the Offer Quick Edit Visualforce page.

TE R

A. Change the URL in the address bar of the browser to: https://salesforceserver.salesforce.com/apex/OfferQuickEdit Note: Be sure to replace salesforceserver.salesforce.com with the exact site name from your URL, which is typically something like na9.salesforce.com.

IN

A warning is displayed that the page does not exist. B. Click the Create Page OfferQuickEdit link. C. Once the page has been created and loaded, click OfferQuickEdit in the lower left corner of the screen. D. Delete all of the text between the components (lines 2-5) and enter: Hello World! E. Click Save.

©Copyright 2013 salesforce.com, inc. All rights reserved. Building Applications with Force.com – Exercise Guide – Page 121 of 144

Review 1. What does Development mode enable?

O N

LY

2. How did you create this page? What tools did you use?

IN

TE R

N

AL

U

SE

3. What are the tags used for?

©Copyright 2013 salesforce.com, inc. All rights reserved. Building Applications with Force.com – Exercise Guide – Page 122 of 144

18-3: Use a Standard Controller and Override a Standard Page Goal: Modify the Offer Quick Edit page to include the Offer standard controller. Scenario: The Universal Containers recruiting team needs a fast way to update the expiration data and status for offers. Task: 1. Add the Offer standard controller to the page. 2. Override the standard Offer view page.

LY

Time:

Instructions:

SE

1. Add the Offer standard controller to the page.

O N

10 minutes

A. Open the Offer Quick Edit page by navigating to:

U

https://salesforceserver.salesforce.com/apex/OfferQuickEdit

AL

B. Add the Offer standard controller to the component:

N

C. Save the page.

TE R

2. Override the standard Offer view page.

IN

A. Navigate to Setup | Create | Objects | Offer. B. In the Buttons, Links, and Actions related list, click the Edit link next to View. C. Select the Visualforce Page radio button and select OfferQuickEdit [OfferQuickEdit] from the picklist, then click Save. D. Click the Offers tab. E. Open an available offer. F. Does the new Offer Quick Edit page appear?

©Copyright 2013 salesforce.com, inc. All rights reserved. Building Applications with Force.com – Exercise Guide – Page 123 of 144

Review

IN

TE R

N

AL

U

SE

O N

LY

1. What changed when the standard controller was added?

©Copyright 2013 salesforce.com, inc. All rights reserved. Building Applications with Force.com – Exercise Guide – Page 124 of 144

18-4: Find Components and Their Attributes Goal: Use the component reference to answer the questions. Task: Answer the questions below. Time: 15 minutes

LY

Instructions:

SE

O N

1. Find the component that can be used to create a new button.

TE R

N

AL

U

2. What attributes are required for the component?

IN

3. What attribute of the component can be used to hide the related lists?

4. What attribute of the component can be used to hide the sidebar?

©Copyright 2013 salesforce.com, inc. All rights reserved. Building Applications with Force.com – Exercise Guide – Page 125 of 144

5. Find two components that should be placed within an component.

O N

LY

6. What is the component used for?

IN

TE R

N

AL

U

SE

7. What components should be used to create the Offer Quick Edit page?

©Copyright 2013 salesforce.com, inc. All rights reserved. Building Applications with Force.com – Exercise Guide – Page 126 of 144

18-5: Complete the Offer Quick Edit Page Goal: Modify the existing Offer Quick Edit page to include all the components needed to complete it. Scenario: The Universal Containers recruiting team needs a fast way to update the expiration data and status for offers. Task:

LY

1. Add the needed components to complete the Quick Edit section. 2. Hide the related lists on the page. 3. Test the new page. Time:

O N

15 minutes

SE

Instructions:

1. Add the needed components to complete the Quick Edit section.

U

A. Open an Offer record. B. Change the Hello message to include the User’s first name and click save:

AL

Hello {!$User.FirstName}!

N

C. Add the Chatter feed to the page using the component and click save.

TE R

D. Add the component to display any system messages on the page.

IN



E. Add the component to begin creating the Quick Edit section. F. Add the page block section using the component and click save. G. Using the component reference, copy the usage of the component and paste it within the component. H. Remove the title and change the column number to 3 on the component. I. Change the input field components to reference the Offer Expiration Date and Offer Status fields and click Save. J. Add the Save button using the component. ©Copyright 2013 salesforce.com, inc. All rights reserved. Building Applications with Force.com – Exercise Guide – Page 127 of 144

K. Make sure all components have both open and closing components and click Save. 2. Hide the related lists on the page. A. Add the component after the component to display the rest of the Detail page. B. Add the relatedList attribute to the component and set it to false. C. Save the page. 3. Test the new page.

SE

O N

LY

A. Click the Offers tab. B. Open an available offer. Does the new Quick Edit section appear?

IN

TE R

N

AL

U

C. Change the status of an offer and click Update. Does the Offer record update?

©Copyright 2013 salesforce.com, inc. All rights reserved. Building Applications with Force.com – Exercise Guide – Page 128 of 144

18-6: Create the Candidate Page Goal: Create the candidate Visualforce page. Scenario: Universal Containers would like the name and picture of the candidate to display at the top of the candidate page. Task: Create the candidate page. Add the needed components to display the candidate's name and picture. Complete the page. Override the standard candidate page. Test the new page.

LY

1. 2. 3. 4. 5.

O N

Time:

SE

20 minutes

Instructions:

U

1. Create the candidate page.

AL

A. Add /apex/candidate to the URL. B. Click the Create Page Candidate link. C. Add the Candidate standard controller to the component.

TE R

D. Save the page.

N

2. Add the needed components to display the candidate's name and picture.

IN

A. Add the component to display any error message on the page. B. Add the needed components to create the page section to display the candidate’s name and picture. C. Insert the candidate's name in the page using HTML tags. {!Candidate__c.First_Name__c} {!Candidate__c.Last_Name__c}

©Copyright 2013 salesforce.com, inc. All rights reserved. Building Applications with Force.com – Exercise Guide – Page 129 of 144

D. Display the candidate's picture using the component. 3. Complete the page. A. Add the needed components to display the Chatter feed. B. Add the components to display the rest of the fields. C. Make sure all components have the needed closing components.

LY

4. Override the standard candidate page.

O N

A. Navigate to Setup | Create | Objects | Candidate. B. In the Buttons, Links, and Actions related list, click the Edit link next to View. C. Select the Visualforce Page radio button and select Candidate [Candidate] from the picklist, then click Save.

SE

5. Test the new page.

IN

TE R

N

AL

U

A. Click the Candidates tab. B. Open an existing candidate. Does the candidate's name and picture appear at the top?

©Copyright 2013 salesforce.com, inc. All rights reserved. Building Applications with Force.com – Exercise Guide – Page 130 of 144

18-7: Create the Review Page (Optional) Goal: Create a Visualforce page for the Review object that displays the score fields as radio buttons. Scenario: Universal Containers would like the Review object's Edit page to provide more guidance about what score should be entered. They would like the score fields to be replaced with radio buttons that match this: Excellent = 5.0 Good = 4.0 Average = 3.0 Fair = 2.0 Poor = 1.0

LY

    

SE

Create the review page. Add the components to display the Save and Cancel buttons. Add the components to display the fields in the information section. Add the needed components to display radio buttons for the score fields. Override the review edit page. Test the new page.

U

1. 2. 3. 4. 5. 6.

O N

Task:

AL

Time:

TE R

Instructions:

N

15 minutes

1. Create the review page.

IN

A. Create a new Visualforce page with the name reviewscore. B. Add the Review standard controller to the component. C. Save the page.

2. Add the components to display the Save and Cancel buttons. A. Create the structure of the page by adding the needed , , and components. B. Add the Save and Cancel buttons using the and components. ©Copyright 2013 salesforce.com, inc. All rights reserved. Building Applications with Force.com – Exercise Guide – Page 131 of 144

C. Save the page. 3. Add the components to display the fields in the information section. A. Create a section named Information using the component.

LY

B. Display the Interviewer, Recommend for Hire, Job Application, Reason Recommended, and Legacy Review Number fields in the information section using the component.

SE

O N

C. Save the page.

U

4. Add the needed components to display radio buttons for the score fields.

AL

A. Create a section named Score using the component.

TE R

N

B. Copy the contents of the file 18-7--CreatetheReviewPage.txt found in the M18_IntroVisualforcePagesExerciseFiles\Exercises folder into the editor within the component. C. Save the page. D. Display the Cultural Comments field using the component.

IN

E. Change the Experience field to display as radio buttons using the and components. The contents copied in Step B can be used as a starting point. F. Display the Experience Comments field using the component. ©Copyright 2013 salesforce.com, inc. All rights reserved. Building Applications with Force.com – Exercise Guide – Page 132 of 144

G. Change the Leadership Skills field to display as radio buttons using the and components. The contents copied in Step B can be used as a starting point.

LY

H. Display the Leadership Comments field using the component.

O N

I. Save the page. J. Make sure all components have the needed closing components. K. Save the page.

SE

5. Override the review edit page.

6. Test the new page.

AL

U

A. Navigate to Setup | Create | Objects | Review. B. In the Buttons, Links, and Actions related list, click the Edit link next to New. C. Select the Visualforce Page radio button and select reviewscore [reviewscore] from the picklist, then click Save.

IN

TE R

N

A. Click the Reviews tab. B. Click New. Do the Cultural Fit, Experience, and Leadership Skills fields appear as radio buttons?

©Copyright 2013 salesforce.com, inc. All rights reserved. Building Applications with Force.com – Exercise Guide – Page 133 of 144

18-8: Create the Console Page Template and Job Application Console Page Goal: Create a console page made up of a Visualforce template and a Visualforce page to replace the Job Application page. Scenario: The Universal Containers recruiting team would like a console page that pulls in information from Job Application, Position, and Candidate. Instead of building a one-off Job Application console page, a template should be built so it can be used for several different console pages. Tasks:

LY

Create the custom console template page. Create the Job Application console page. Override the Job Application view to use the new console page. Give the recruiting team access to the new console page. Test the new functionality.

O N

1. 2. 3. 4. 5.

Time:

SE

25 minutes

U

Instructions:

AL

1. Create the custom console template page.

TE R

N

A. Create the console template using ConsoleTemplate as the name. B. Copy the entire contents of the file 18-8--CreatetheConsolePageTemplate.txt found in the M18_IntroVisualforcePagesExerciseFiles\Exercises folder into the editor. C. Complete the three sections of the code marked TODO using the component and the needed attributes. Be sure to save as you work.

IN

2. Create the Job Application console page. A. Open a Job Application record. B. Copy the Salesforce record ID from the end of the URL: https://salesforceserver.salesforce.com/RecordID C. Create the Job Application console page with the name JobApplicationConsole. D. Add ?id=RecordID to the end of the URL and press ENTER. Use the record ID copied in Step B as RecordID. E. Copy the entire contents of the file 18-8--JobApplicationConsole.txt found in the M18_IntroVisualforcePagesExerciseFiles\Exercises folder into the editor. F. Complete the four sections of the code marked TODO using the and components. Be sure to save as you work. 3. Override the Job Application view to use the new console page. A. Navigate to Setup | Create | Objects | Job Application. ©Copyright 2013 salesforce.com, inc. All rights reserved. Building Applications with Force.com – Exercise Guide – Page 134 of 144

B. In the Buttons, Links, and Actions related list, click the Edit link next to View. C. Select the Visualforce Page radio button and select JobApplicationConsole [JobApplicationConsole] from the picklist, then click save. 4. Give the recruiting team access to the new console page. A. Navigate to Setup | Manage Users | Profiles | Custom – Recruiter. B. Select Visualforce Page Access and click Edit. C. Select JobApplicationConsole and move it to Enabled Visualforce Pages and click save. 5. Test the new functionality.

SE

O N

LY

A. Click the Job Applications tab. B. Open a Job Application record. Is the new Job Application console displayed?

IN

TE R

N

AL

U

C. Can you edit all three of the objects using the respective Edit buttons?

©Copyright 2013 salesforce.com, inc. All rights reserved. Building Applications with Force.com – Exercise Guide – Page 135 of 144

Review 1. On the Job Application console page, what are the two components being used for?

SE

O N

LY

2. On the Console Template page, what is the component for?

IN

TE R

N

AL

U

3. Do components have to be within a component?

©Copyright 2013 salesforce.com, inc. All rights reserved. Building Applications with Force.com – Exercise Guide – Page 136 of 144

18-9: Add the Confidential Image to the Job Application Console Goal: Add the Confidential graphic to the Job Application console page. Scenario: The Universal Containers recruiting team wants to highlight that the job application information is confidential. They would like the Confidential graphic to display on the console page. Tasks: 1. Upload the Confidential graphic as a static resource. 2. Add the image to the console page.

LY

Time:

O N

10 minutes

Instructions:

SE

1. Upload the Confidential graphic as a static resource.

U

A. Navigate to Setup | Develop | Static Resources. B. Click New. C. Enter the following information about the Confidential graphic:

D. Click Save.

TE R

N

AL

i. Name: confidential ii. Description: The Confidential graphic for the Job Application console page. iii. File: Locate the confidential.png file in the M18_IntroVisualforcePagesExerciseFiles\Exercises folder. iv. Cache Control: Public

IN

2. Add the image to the console page. A. Open a Job Application record. B. Using the inline editor, add the image after the component. C. Save the page. D. Test the page by opening a different Job Application record.

©Copyright 2013 salesforce.com, inc. All rights reserved. Building Applications with Force.com – Exercise Guide – Page 137 of 144

19-1: Add Web Content to a Visualforce Page Goal: Create a Visualforce page that displays a list of candidates and a website. Scenario: Universal Containers wants to display the Employee Referral page at the bottom of the Candidate list view page, so employees can easily refer people to the company. The employee referral page is still under development, so just use the Salesforce page as a placeholder and do not override the standard Candidate page. Tasks:

LY

1. Create a Visualforce page that displays the recent candidates. 2. Add a website to the page.

O N

Time:

SE

15 minutes

Instructions:

U

1. Create a Visualforce page that displays the recent candidates.

N

AL

A. Create a page with the name CandidateListViewWebpage. B. Add the Candidate standard controller to the page. C. Use the component and its attributes to display a list of ten candidates 400 px high and click save.

TE R

2. Add the Employee Referral website to the page. A. Add the website to the page using the component.

IN

B. Save the page.

©Copyright 2013 salesforce.com, inc. All rights reserved. Building Applications with Force.com – Exercise Guide – Page 138 of 144

19-2: Create a Mass Edit List Page (Optional) Goal: Create a page that lists a set of records that can be edited. Scenario: The Recruiting team would like a page that displays all the available positions where they can edit the status of multiple positions. 1. 2. 3. 4.

Create a Visualforce page that displays a list of positions. Add the Save and Cancel buttons. Add the needed columns. Test the page.

O N

Time:

LY

Tasks:

15 minutes

SE

Instructions:

1. Create a Visualforce page that displays a list of positions.

TE R

N

AL

U

A. Create a Visualforce page with PositionMassEdit as the name. B. Copy the entire contents of the file 19-2--CreatingaMassEditListPage.txt found in the M19_AdditionalVisualforcePagesExerciseFiles\Exercises folder into the editor. C. Save the file. D. Complete the first TODO task by adding the needed recordSetVar attribute to the component. 2. Add the Save and Cancel buttons.

IN

A. Complete the second TODO task using the and components. B. Save the file. 3. Add the needed columns. A. Complete the third TODO task using the component. B. Save the file. 4. Test the page. A. Change the status of two different positions and click Save. B. Do the updates display?

©Copyright 2013 salesforce.com, inc. All rights reserved. Building Applications with Force.com – Exercise Guide – Page 139 of 144

19-3: Deploy a Flow using Visualforce Goal: Create a Visualforce page that displays the Candidate flow. Scenario: The Recruiting team wants to use the Candidate flow when inputting information for all new candidates. Tasks:

LY

1. Create a Visualforce page that displays the Candidate flow. 2. Override the standard New view on the Candidate object. 3. Modify the recruiting profile to give them access to the page. Time:

O N

10 minutes

SE

Instructions:

1. Create a Visualforce page that displays the Candidate flow.

AL

U

A. Create a page with the name CandidateFlow. B. Add the Candidate standard controller to the page. C. Hide the side bar on the page using the sidebar attribute of the component. D. Use the component to display the Candidate flow.

TE R

N

2. Override the standard New view on the Candidate object.

IN

A. Navigate to Setup | Create | Objects | Candidate. B. In the Buttons, Links, and Actions related list, click the Edit link next to New. C. Select the Visualforce Page radio button and select CandidateFlow [CandidateFlow] from the picklist, then click Save. 3. Modify the Recruiter profile to give them access to the page. A. Navigate to Setup | Manage Users | Profiles | Custom – Recruiter. B. Select Visualforce Page Access and click Edit. C. Select CandidateFlow and move it to Enabled Visualforce Pages, and click Save.

©Copyright 2013 salesforce.com, inc. All rights reserved. Building Applications with Force.com – Exercise Guide – Page 140 of 144

19-4: Display the Job Site Goal: Create a Visualforce page that displays the Job Posting site and add it to a page layout. Scenario: Universal Containers wants to display the website listed in the Job Posting site record below the record details. Tasks: 1. Create a Visualforce page that displays the website based on the information in the record. 2. Insert the page into the Job Posting site page layout.

LY

Time:

O N

15 minutes

Instructions:

SE

1. Create a Visualforce page that displays the website based on the information in the record.

N

AL

Src: Job_Posting_Site__c.Job_Site_Name__c Frameborder: true Height: 200px Scrolling: true ID: JobSite

TE R

i. ii. iii. iv. v.

U

A. Create a page with the name JobSite. B. Add the Job Posting Site standard controller to the page. C. Add an iFrame to the page with the following attributes:

D. Save the page.

2. Insert the page into the Job Posting Site page layout.

IN

A. Click Setup | Create | Objects | Job Posting Site. B. In the Page Layouts related list, click Edit on the Job Posting Site layout. C. Drag a new section from the palette to below the System Information section. i. Name: Job Site ii. Layout: 1-Column D. E. F. G. H.

Click OK. Click Visualforce Pages from the palette. Drag the JobSite page to the Job Site section. Click Save. Create a new Job Post Site record.

©Copyright 2013 salesforce.com, inc. All rights reserved. Building Applications with Force.com – Exercise Guide – Page 141 of 144

i.

Click Job Posting Sites | New. a. Description: Testing the new Visualforce page. b. Job Site Name: http://www.careerbuilder.com c. Status: Active

ii. Click Save.

TE R

N

AL

U

SE

O N

LY

Does the website display below the record details?

IN

I.

©Copyright 2013 salesforce.com, inc. All rights reserved. Building Applications with Force.com – Exercise Guide – Page 142 of 144

19-5: Create a Partial Page Update for Conditional Fields (Optional) Goal: Override the Position New page to only display certain fields based on the values of others, and refresh only the part of the page that is required. Scenario: Universal Containers wants the fields specific to a technical position to appear only when the department is set to either Engineering or IT. 1. 2. 3. 4.

Create a Visualforce page based on the Position page. Add the partial page update to the page. Override the Position New button. Test the page.

O N

Time:

LY

Tasks:

SE

20 minutes

Instructions:

U

1. Create a Visualforce page based on the Position page.

TE R

N

AL

A. Create a page with the name PositionPartialPageUpdate. B. In the Page Editor, delete all of the default text and paste in the contents of the 19-5--PositionPartialPageUpdate.txt file in the M19_AdditionalVisualforcePagesExerciseFiles\Exercises folder. C. Click Save. 2. Add the partial page update to the page by completing the sections of the code marked TODO. 3. Override the Position New button.

IN

A. Navigate to Setup | Create | Objects | Position. B. In the Buttons, Links, and Actions related list, click the Edit link next to New. C. Select the Visualforce Page radio button and select PositionPartialPageUpdate [PositionPartialPageUpdate] from the picklist. D. Select the Skip Record Type Selection Page and click Save. 4. Test the page. A. Add a new position. B. What happens when you change the Department field value to and from Engineering?

©Copyright 2013 salesforce.com, inc. All rights reserved. Building Applications with Force.com – Exercise Guide – Page 143 of 144

Review

IN

TE R

N

AL

U

SE

O N

LY

1. What is the syntax for adding logic to data binding expressions?

©Copyright 2013 salesforce.com, inc. All rights reserved. Building Applications with Force.com – Exercise Guide – Page 144 of 144

View more...

Comments

Copyright ©2017 KUPDF Inc.
SUPPORT KUPDF