Old - Admin Developer Workshop - Day 2
Old - Admin Developer Workshop - Day 2
Administrator
Workshop
Day 2
Securing and Sharing Data
Custom Workflow and Approval Processes
Agenda 1
Securing and Sharing Data
Review Day 1
What Can You Remember?
Let us see…
http://bit.ly/1sEcHiw
https://help.salesforce.com/HTTrainingModulesDetail?courseId=a
1S30000000gvGyEAI&Catalog=Premier
What is a User?
What is a Profile?
Permissions – What Users Can Do!
What are the Profile Permissions?
System Permissions – e.g. Customize Application
What are the Profile Permissions?
Object Permissions Create, Read, Update (Edit), Delete
CRUD
What are the Profile Permissions?
Field Level Security by Object - FLS
Hands-on Exercise
View the hands on exercise steps in the Building Applications with Force.com -
Part 1 “Managing Your Users’ Experience” Exercise Guide
https://lms.cfs-api.com/v1/content/5596bde8-0a05-4a03-9568-3470e908c053/presentation_con
tent/external_files/managingyourusersexperienceexerciseguide.pdf
• Users have only one profile but can have multiple permission sets
• Use profiles to assign most restrictive permissions and access
settings
• Use Permission Sets to grant additional permissions individually
What are Permission Sets?
Hands-on Exercise
View the hands on exercise steps in the Building Applications with Force.com -
Part 1 “Managing Your Users’ Experience” Exercise Guide
https://lms.cfs-api.com/v1/content/5596bde8-0a05-4a03-9568-3470e908c053/presentation_con
tent/external_files/managingyourusersexperienceexerciseguide.pdf
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.
What is Field Level Security?
Determines access to edit or read individual fields by profile
View the hands on exercise steps in the Building Applications with Force.com -
Part 1 “Managing Your Users’ Experience” Exercise Guide
https://lms.cfs-api.com/v1/content/5596bde8-0a05-4a03-9568-3470e908c053/presentation_con
tent/external_files/managingyourusersexperienceexerciseguide.pdf
Tasks:
Modify the field-level security for candidates to hide the Social
Security Number field for recruiters.
What are Record Types?
Determines the required fields by page layout and the valid pick list
values by business process to ensure users only complete valid
•fields
Defineand values.sets of values for Standard and Custom picklist
different
fields
• Implement custom business process by associating them to specific
page layouts
What are Record Types
Things to Know
Business
Process
Page
Layout
Record
Type
Hands-on Exercise
View the hands on exercise steps in the Building Applications with Force.com -
Part 1 “Managing Your Users’ Experience” Exercise Guide
https://lms.cfs-api.com/v1/content/5596bde8-0a05-4a03-9568-3470e908c053/presentation_con
tent/external_files/managingyourusersexperienceexerciseguide.pdf
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.
Tasks:
1. Create a technical position record type.
2. Repeat the process, creating a non-technical position record type.
Hands-on Exercise
View the hands on exercise steps in the Building Applications with Force.com -
Part 1 “Managing Your Users’ Experience” Exercise Guide
https://lms.cfs-api.com/v1/content/5596bde8-0a05-4a03-9568-3470e908c053/presentation_con
tent/external_files/managingyourusersexperienceexerciseguide.pdf
Tasks:
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.
Hands-on Exercise
View the hands on exercise steps in the Building Applications with Force.com -
Part 1 “Managing Your Users’ Experience” Exercise Guide
https://lms.cfs-api.com/v1/content/5596bde8-0a05-4a03-9568-3470e908c053/presentation_con
tent/external_files/managingyourusersexperienceexerciseguide.pdf
Tasks:
1. Create new page layout for approved positions.
2. Create new record types for approved positions.
Video: Controlling Access to Records
• Examine different ways in which users receive access to records:
through ownership, organization wide defaults, roles and sharing
rules. (25 min)
• - Record Ownership
• - Record Access
• - Organization wide Defaults
• - Roles & Role Hierarchy
• - Sharing Rules
• - Access Rights
https://help.salesforce.com/HTTrainingModulesDetail?
courseId=a1S30000000gvGyEAI
Record Ownership
• By Default an owner of a record can Read, Edit, Delete or change Ownership of the
record
• Child Records inherit ownership from the parent
• Users or Queues can be the owner of records
• If the read permission for the object is revoked from the users profile, the user will
not be able to see their own record
• Queue ownership allows multiple users to own a record
• The Profile determines the objects level access
• Sharing controls record access
Record Ownership
Individual Record Ownership
37
Hands-on Exercise
View the hands on exercise steps in the Designing Apps for Multiple Users
“Managing Your Users’ Experience” Exercise Guide
https://lms.cfs-api.com/v1/content/74504714-0d8d-456e-bf33-f0132b6a4f67/data/downloads/co
ntrollingaccesstorecordsexercises.pdf
Tasks:
Create a queue for positions and candidates.
What are the Organizational Wide Defaults?
Determine the base-line visibility of each record in an object
Hands-on Exercise
View the hands on exercise steps in the Designing Apps for Multiple Users
“Managing Your Users’ Experience” Exercise Guide
https://lms.cfs-api.com/v1/content/74504714-0d8d-456e-bf33-f0132b6a4f67/data/downloads/co
ntrollingaccesstorecordsexercises.pdf
Tasks:
Change the organization-wide default setting for Positions.
Hands-on Exercise
View the hands on exercise steps in the Designing Apps for Multiple Users
“Managing Your Users’ Experience” Exercise Guide
https://lms.cfs-api.com/v1/content/74504714-0d8d-456e-bf33-f0132b6a4f67/data/downloads/co
ntrollingaccesstorecordsexercises.pdf
45
What are Roles and Role Hierarchy?
First step in relaxing the security constraints as defined by the OWD
• What is a role?
– Controls the level of visibility that users have to an organization’s data
– A user may be associated to one role
• What is a role hierarchy?
– Controls data visibility
– Controls record roll up, forecasting and reporting
– Users inherit the record ownership ability of data owned by or shared
with users below them in the hierarchy
– Not necessarily the company’s organization chart
Custom Objects and the Role Hierarchy
Need to check “Grant Access Using Hierarchies” box
Hands-on Exercise
View the hands on exercise steps in the Designing Apps for Multiple Users
“Managing Your Users’ Experience” Exercise Guide
https://lms.cfs-api.com/v1/content/74504714-0d8d-456e-bf33-f0132b6a4f67/data/downloads/co
ntrollingaccesstorecordsexercises.pdf
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.
What is a Public Group
A way to group users together who may not have any connection
View the hands on exercise steps in the Designing Apps for Multiple Users
“Managing Your Users’ Experience” Exercise Guide
https://lms.cfs-api.com/v1/content/74504714-0d8d-456e-bf33-f0132b6a4f67/data/downloads/co
ntrollingaccesstorecordsexercises.pdf
Tasks:
Create a public group called All Interviewers.
Role Hierarchy still not giving access
Role Hierarchy works fine for downward visibility – what about across
the organization?
What are Sharing Rules
Ability to access records across the hierarchy, the 2 nd method of
relaxing security imposed by the OWD
Sharing Rules
The 4 rules…
• Choose from
– Role,
– Role & Subordinate,
– Group
• Global Public Group – All Internal Users
Criteria Based Sharing Rules
Used when records are not owned by roles, roles and subordinates
or public groups
• Determine which records to share based on field values in records
• Are ideal for companies with complex sharing requirements
Hands-on Exercise
View the hands on exercise steps in the Designing Apps for Multiple Users
“Managing Your Users’ Experience” Exercise Guide
https://lms.cfs-api.com/v1/content/74504714-0d8d-456e-bf33-f0132b6a4f67/data/downloads/co
ntrollingaccesstorecordsexercises.pdf
Tasks:
Create sharing rules to give recruiters the access they need to
positions, candidates, job applications, and reviews.
What is Manual Sharing
One-off individual sharing of a record – further relaxation of the OWD
View the hands on exercise steps in the Designing Apps for Multiple Users
“Managing Your Users’ Experience” Exercise Guide
https://lms.cfs-api.com/v1/content/74504714-0d8d-456e-bf33-f0132b6a4f67/data/downloads/co
ntrollingaccesstorecordsexercises.pdf
View the hands on exercise steps in the Designing Apps for Multiple Users
“Managing Your Users’ Experience” Exercise Guide
https://lms.cfs-api.com/v1/content/74504714-0d8d-456e-bf33-f0132b6a4f67/data/downloads/co
ntrollingaccesstorecordsexercises.pdf
Tasks:
Establish manual sharing for an existing position.
Sharing Review
This is the order the system will follow to see if a user can view a
record
The Big Picture
Profiles and Security Model combined
Video: Who Sees What: Overview
• This quick overview covers the main features in Salesforce that
determine the visibility of, and access to data that every administrator
will need to set up for their Salesforce organization. This is the first in a
series called "Who Sees What".. (5 min)
• bit.ly/devadmwhoseeswhat
Video: Who Sees What: Organization Access
• This second video in the "Who Sees What" series describes how to
grant users access to your org by specifying both login ranges, as well
as login hours.. (6 min)
• https://www.youtube.com/watch?annotation_id=annotation_38130
10209&feature=iv&src_vid=Hm3bT01Fxpw&v=twOefyyhc5I
Video: Who Sees What: Object Access Security
• This third video in the "Who Sees What" series describes how to grant
users access to objects by using profiles. Profiles determine which
objects users have access to, and what rights they have on each
object. (6 min)
• https://www.youtube.com/watch?annotation_id=annotation_49650
0545&feature=iv&src_vid=9hxRSxWRmAc&v=VuF31-7Wc6c
Video: Who Sees What: Organization-Wide
Defaults
• This fourth video in the "Who Sees What" series describes how to set
the default sharing settings. These settings determine the access users
have to records owned by other users. Please view the entire series to
get a complete picture of visibility and access.
(6 min)
• https://www.youtube.com/watch?annotation_id=annotation_26990
26523&feature=iv&src_vid=u9PHTLwtomo&v=8rzn-DtG8nc
Video: Who Sees What: Record Access via
Sharing Rules
• This video in the "Who Sees What" series describes how to open up
access to records, if you have set the default sharing settings to
anything more restrictive than Public Read/Write. You can use Sharing
Rules to extend access to users in roles, public groups, or territories.. (6
min)
• https://www.youtube.com/watch?annotation_id=annotation_40654
50945&feature=iv&src_vid=OF-ZeS66Qr0&v=JEKZ2OjwzS8
Video: Who Sees What: Field Level Security
• The sixth video in the "Who Sees What" series describes how to use
field level security to prevent access to specific fields on a profile by
profile basis. (6 min)
• https://www.youtube.com/watch?v=Ikn1LWsz9xY
Video: Designing Data Access Security
• This module provides a summary of security and access features.
Through a number of business scenarios, students will have the
opportunity to apply the knowledge that they have gained about
determining user access. (13 min)
• - Determine Data Access
• - Apply OWD, Public Groups and Manual Sharing to create conditional
access to data
• - Analyze suitability of FLS, Page Layouts and Record Type to satisfy
business requirements
View the hands on exercise steps in the Building Applications with Force.com -
Part 2 “Designing Data Access Security” Exercise Guide
https://lms.cfs-api.com/v1/content/d8713df2-f015-49c2-9d89-6d82a242d493/presentation_cont
ent/external_files/designingdataaccesssecurityexerciseguide.pdf
Tasks:
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.
Hands-on Exercise
View the hands on exercise steps in the Building Applications with Force.com -
Part 2 “Designing Data Access Security” Exercise Guide
https://lms.cfs-api.com/v1/content/d8713df2-f015-49c2-9d89-6d82a242d493/presentation_cont
ent/external_files/designingdataaccesssecurityexerciseguide.pdf
Tasks:
1. Create a new Salary object.
2. Add custom fields to the Salary object.
3. Give hiring managers and recruiters access to the new Salary
Object.
4. Set organization-wide defaults for Salaries.
5. Remove the Min Pay and Max Pay fields and the Compensation
section from the Position page layouts.
Custom Workflows
Video: Automating Business Processes with
Workflow
• Learn how workflow rules can be used to create automated
processes. Take a look at the actions that can be triggered by
workflow rules. Look at how to automate processes using an
immediate action workflow rule and a time-based workflow rule.
Additionally, see how to monitor time-based workflow queues.
(14 min)
• - List the actions that can be triggered by a workflow rule
• - Create a Workflow rule
• - Describe the differences between time-dependent and immediate
workflow actions
https://help.salesforce.com/HTTrainingModulesDetail?courseId=a1S3
0000000gvH3EAI&Catalog=Premier
What is Workflow?
Workflow is a feature that allows the automation of business
processes
A Workflow Rule:
• Triggers and action when a record meets the criteria for a rule.
• Can trigger actions that either occur immediately or can be time-
dependent
• Needs good naming convention
• Is evaluated only for records created or edited after the rule has
been created. It does not retro act on existing records
Process to Create a Workflow Rule
Three Steps…
View the hands on exercise steps in the Building Applications with Force.com -
Part 2 “Automating Business Processes with Workflow” Exercise Guide
https://lms.cfs-api.com/v1/content/0d1e5119-39d5-4980-a706-981313857527/presentation_cont
ent/external_files/automatingbusinessprocesseswithworkflowexerciseguide.pdf
Tasks:
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.
Time Dependent Workflow
Time Dependent Workflow Considerations
Hands-on Exercise
View the hands on exercise steps in the Building Applications with Force.com -
Part 2 “Automating Business Processes with Workflow” Exercise Guide
https://lms.cfs-api.com/v1/content/0d1e5119-39d5-4980-a706-981313857527/presentation_cont
ent/external_files/automatingbusinessprocesseswithworkflowexerciseguide.pdf
Tasks:
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.
Hands-on Exercise
View the hands on exercise steps in the Building Applications with Force.com -
Part 2 “Automating Business Processes with Workflow” Exercise Guide
https://lms.cfs-api.com/v1/content/0d1e5119-39d5-4980-a706-981313857527/presentation_cont
ent/external_files/automatingbusinessprocesseswithworkflowexerciseguide.pdf
Tasks:
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.
10 Time Triggers per Rule
Trigger
(Criteria) Time Trigger Time Trigger
Eg. 1 Day Eg. 2 Days
Workflow
Immediate Time-Dependent
https://lms.cfs-api.com/v1/12/lms.aspx?hash=WUlRa1pjd0RRUDVoU291dk
MveG5idFVYNXNpTVNQaXp3WDVoV0dyWjQ2a1lneE91VG15cUd4eEhJdzZ4
L3dCN0VIbDYya1I5Q0lsbHduSDhjcUlwYTVZSm9Vdm9wMVlBZ1VoVzEyeGp
DZE5uMXNUNGNrY0VSWkJNUW05YU0xWXRnbW1IZVFlK0pEUHRMTmJGa
m9aWkJHL0xHSFJrd3
Hands-on Exercise
View the hands on exercise steps in the Building Applications with Force.com -
Part 2 “Preserving Data Quality” Exercise Guide
https://lms.cfs-api.com/v1/content/7ed29c50-201f-4eb5-ae62-5de8f2312a68/present
ation_content/external_files/preservingdataqualityexerciseguide.pdf
Custom validation rules are only executed if there are no errors from
standard validations.
Required Unique
© Copyright 2011 97
Validation Rule Design Methodology
Follow a consistent process to ensure you have well-designed rules.
2. Break down the description ▪ User must not be able to save opportunity if
into one or more simple
– Has Support Plan is selected.
statements describing error
conditions. – Support Plan Expiration Date is blank.
https://help.salesforce.com/HTViewHelpDoc?id=customize_functions_i_z.
htm
99
Queues & Public Groups
Queues
Queues are locations where records await processing by assigned
members. Queues can contain public groups, roles, roles + subordinates,
and users.
▪ When you create a queue, a view is
automatically added to the lead
(or case) home page.
▪ Members of the queue are free to
accept leads (or cases) from the queue.
• https://www.youtube.com/watch?v=5i4yuCkyoNY