001salesforce ADMIN Notes
001salesforce ADMIN Notes
Ravi
Salesforce introduction
End-user is the person who will use general software like Gmail, face book, WhatsApp
Enterprise-User The person (company) who will use CRM application
Salesforce is very famous to design not only CRM application but also other required application
for companies with fully automation like
Recruiting Application
Project Management Application
Contacts Management Application
Budget Management Application
Inventory Management Application
Report Management Application etc...
Cloud: [Generally Cloud is nothing but internet]
Inter connection of computers throughout the glob is known as internet, the main purpose of
internet (Cloud) is to share the services of one computer to the other computers throughout the
glob
Cloud Services: Cloud provides following three types of services
1. SAAS (Software as a Service)
2. PAAS (platform as a Service)
3. IAAS (Infrastructure as a Service)
SAAS: In this scenario end user will get the application as a service through internet
Ex:- Gmail, face book, any enterprise application ... etc
In the above example server provides application as a service that means
1. Server accepts the request from client.
2. Perform some operation based on request.
3. Return response back to the client
SAAS is available in following 2 ways
1) Free Services 2) Paid Services
In Free Service end user will get the service from an application through internet for free out of
cost. Ex: Face book, YouTube, Google etc...
In Paid Service end user will get the service from the application through internet by paying
some amount. Ex: Internet Security Services, Matrimonial, Job Searching, CRM apps, etc...
It is very mandatory to maintain server and database for every public application or private
application (Enterprise Apps) which are used by multiple users,
If any computer contains server software is known as server machine without server software
user won't get service from application.
If any computer contains database software is known as database machine, in which customer
data is stored permanently in the form of tables, so that accessing of the data becomes very easy
in future.
Enterprise Applications are used by multiple users of a specific business firm so that it must be
kept inside the server software and also database is required to store the customer data
PAAS: In this scenario companies (Business firm) will get platform as a service like server, data
base, OS… etc through internet.
Pass is a paid service provided by platform vendors like Salesforce.com, Microsoft, and Google
etc...
Advantages with PASS:
1) no need to maintain Server and database in the premises of Business firms
2) Maintains cost will be reduced
3) Time and resources are reduced along with money while setting up server and data bases
In the above diagram only client machines are available in Samsung premises.
Note: In the above diagram CRM application strictly designed for Samsung
IAAS: In this scenario companies (Business firm) will get hardware equipment as a service
Ex: HardDisk, CPU, Internet etc...
IAAS is a paid service, PAAS and IAAS can be used by business firms on rental basses (cost
per user)
If number of users are increasing cost of the service is increased.
SAAS can be used by both end user and business firms.
The companies which are providing above three cloud services are known as cloud
service Vendors.
Ex: Microsoft, Google, Amazon, SFDC etc…
Because of above cloud services maintaining cost and maintaining burden is reduced on the
business firms
History of Sales force:
The first CRM software was introduced in the year 1993 by Mr.Tomsiebel and that is named as
Siebel CRM.
The main drawback with Siebel CRM is business firm has to maintain their own server and
database and it increases maintenance burden on companies.
In the year 1999 SalesForce CRM was designed by Mr.Mark Benioff, Mr.Parker Harris and they
have established one company called salesforce.com [SFDC] at Sanfrancisco USA.
The main advantage with sales force is, SFDC will provide SAAS and PAAS services that mean
they will maintain server and database separately so that burden on the business firms are
reduced.
Salesforce.com is providing force.com platform to the developers through internet that means
developer no need to maintain separate environment to design the CRM application using sales
force, SFDC is releasing following three releases of sales force every year.
1. Summer release
2. Spring release
3. Winter release
Advantages of salesforce compared to other CRM software
1) It supports to design the enterprise applications for small, Medium, Large Scale business firms.
2) Sales Force provides all cloud services for both developer and business firms, so that
maintenance cost and burden is reduced.
3) Sales Force is very strong in integration with other application.
4) Sales Force internally taken care about the security.
Development: Salesforce provides force.com platform used to develop and the CRM applications
,enterprise apps, web apps with customized options, it provides following twomodules.
Sales Force Admin (Configuration)
Sales Force Development (Customization)
Sales Force Admin:it covers database designing (table creation providing relation between
tables, maintaining database etc…) assigning tasks, providing permission, describing work flow
rules etc...
Sales Force Developer: it covers UI[web pages] and controller program development
1) Visual Force: It is similar to HTML used to design the web pages and these can be used by
employees of business firm.
2) Apex: It is a programming language (Object oriented similar to JAVA) used to design server
side programs to connect with database
Note: Apex and Visual Force are the own languages of SFDC
3) Testing: SFDC provides sand box environment for testing of Apps automatically.
4) Deployment: Sales Force provides in built deployment environment. So that applications can
be deployed in real time servers (which was provided by salesforce.com)
5) Integration: Sales Force provides pre defined API to integrate the CRM Application with
external applications very easily
Note: an app that meets these requirements is going to greatly increase the efficiency of
Company's recruiting and hiring processes
CoverLettertextarea
JAStatuspicklist
5)Fields of JobPosting object: [many to many relation of Position and EmploymentWebsite]
JobpostingIDautonumber (standard field generated at the time of creation of object)
Positionmaster-detail
Employmentwebsite master-detail
6)Fields of Review:
RevieweIDautonumber(standard field generated at the time of creation of object)
Ratingnumber
Reviewmessagetext area
JobApplicationmaster-detail
7)Fields of Passport(table):
PassportIDautonumber(standard field generated at the time of creation of object)
PassportNumbernumber
IssueDatedate
ExpiryDatedate
IssuedLocationtext
Candidate(master-detail relation)
Note: validation rules can be applied on any object based on requirement
Relationship diagram:
2. Once you‘re in the Setup area, you‘ll see a menu on the left side of the page. From that menu,
enter Apps in the Quick Find box, and then select Apps. The text that you enter and the page
name that you click (in this example, Apps) will change depending on the task you‘re performing.
6. Choose the custom apps for which the new custom tab will be available (in this case select
Recruiting app) click Save button
Note: Within the platform, ObjectName is actually stored with __c appended to the end as a
suffix(for example, Position__c). This identifies it as a custom object.
The Record Name is the label for the field that identifies individual position records in the
system. Salesforce automatically populates Record Name with the custom object label followed by
Name. In this case, the field is populated with Position Name. A custom object cannot be saved
without this identifying field.
Introducing Fields:
A field is like a database column. The primary characteristic of a field is its data type,some fields
hold text values, while others hold currency values, percentages, phone numbers, email
addresses, or dates. Some fields look like checkboxes, while still others are drop-down lists or
record lookups from which a user makes a selection.
Add Text Fields:
1. From Setupenter Objects in the Quick Find boxselect ObjectsClick Position.
2. In the Custom Fields & Relationships related list, click New
3. Choose the Text Area (Long) data type, and click Next
4. In the Field Label, enter Job Description(any name)
5. Enter Length and Visible Lines field value
6. Click NextClick NextClick Save & New
Every time you create a custom field, you'll first choose a data type from the field type selection
page. The platform allows us to choose between different types of text fields.
• Basic text fields allow users to enter any combination of letters and numbers on a single line, up
to as many as 255 characters.
• Text area fields also have a 255-character limit but also allow carriage returns so the text can be
formatted on separate lines.
• Long text fields allow as many as 131,072 characters, on separate lines,Since job descriptions
can be lengthy, let's choose a long text area.
Addphone fields:Phone fields contain phone numbers, which can include alphabetic characters.
Client applications are responsible for phone number formatting.
1)In our recruiting app in the candidate object phone fields are required and it allows candidates
to enter phone number and it will automatically populated as universal phone number format.
Add URL fields:URL fields contain URLs. Client applications are responsible for specifying valid
and properly formatted URLs in create()and update() calls.
1) Click employment website tab in the custom fieldsclick newselect the URL data
typeclick next in the field label enter website address.it allows 255 characters only.
2)accept all the other default settings for field level security and page layoutsclick save.
Define a Validation Rule for Min and Max Pay:
1. Min Pay should never be greater than Max Pay.
2. From the Positions tab, click to open the quick access menu (if it is not open already)
3. Hover over View Validation Rulesclick NewIn the RuleName, enter Min_Pay_Rule(can
be any name). The name of a validation rule can't include any spaces, but if you forget, the
platform helpfully changes them to underscores (_) for you.
4. Select the Active checkboxprovide the descriptionClick the Insert Field buttonIn the
left column, select PositionIn the right column, select MinPayClick InsertClick the
Insert Operator buttonchoose Greater Than.
5. Click the Insert Field button once againIn the left column, select PositionIn the right
column, select MaxPayClick Insert.
Note: error condition formula that looks like: Min_Pay__c > Max_Pay__c
6. In the Error Message enter Min Pay cannot exceed Max PaySelect the Location of error
messageclick Save
In the Layout drop-down list, choose 2-Column. This option allows us to choose whether we
want the fields in our section to be arranged in two columns or one. The default is two columns
and is the most common choice. However, if our section is going to contain text area fields, the
one-column layout gives them more space on the page for display
In the Tab-key Order drop-down list, choose Left-Right. This setting controls the direction that a
user's cursor will move when using the Tab key to navigate from field to field.
Click OK. We have a new section for Compensation just above the System Information section!
Let's add the MinPay and MaxPay fields:
While pressing CTRL, click both the Min Pay and Max Pay fields in the Information section, and
drag them to the new Compensation
Create a new one-column Description section below the Compensation section, and drag Job
Description, Responsibilities, Skills Required, and Educational Requirements into it.
Arrange the first column of the Information section as follows
When using fields in formulas, you can't just refer to a field by its name. Instead, you need to
refer to it by its merge field name, also called its API name. The format of the API name is typically
the name of the field but with underscores instead of spaces.
For custom fields, the API name is suffixed with two underscores and the letter ―c,‖ like this:
Open_Date__c. This naming convention in the platform helps distinguish between standard and
custom fields.
Tip:You don't need to memorize the API names of fields you want to use in formulas. Simply use
the field picker in the formula editor to insert fields and the platform automatically inserts the API
name for you. If you ever want to know the API name of a specific field and you aren't using the
formula editor, you can view the field's detail page.
Once again, we can dip into the extensive library of platform functions. The IF() function allows
us to perform a test and then return different values depending on whether the result of the test is
true or false. The IF() function's syntax looks like:
IF(logical_test,value_if_true,value_if_false)
For the logical_test portion, we'll test whether the Close Date field has a value—if it does, the
position obviously must be closed. We'll test for this with a third built-in function: ISBLANK().
ISBLANK() takes a single field and returns true if it does not contain a value and false if it does. So
now our formula looks like:
IF( ISBLANK( Close_Date__c ) ,value_if_true,value_if_false)
By replacing value_if_true and value_if_false with the other formulas we talked about, we've
now figured out our whole formula.
IF(ISBLANK(Close_Date__c),TODAY()-Open_Date__c,Close_Date__c-Open_Date__c)
Our formula calculates the number of days a position has been open, regardless of whether it's
currently open or closed. Now, let's go define a field for it on our Position object.Try It Out: Define
a ―Days Open‖ Custom Formula Field
We'll begin building the formula field the same way we created our other custom fields.From the
position tab ,to open the quick access menu
In the Field Label field, enter Days Open. Field Name is populated automatically.Select the
Number formula return type.
In this case, even though we're subtracting Date fields, we want to end up with just a regular
numeric value.
Change the Decimal Places value to 0, and click Next.
Now it's time to enter the details of our formula.
Click the Advanced Formula tab, as shown in the following screenshot.
Custom Formula Field Editor
We want to use the Advanced Formula tab so we can access the platform's built-in functions
through the Functions list on the right side.From the Functions list, double-click IF.
Our formula now looks like this:
IF(logical_test, value_if_true, value_if_false)
Let's go ahead and define the logical test:
Delete logical_test from the formula, but leave your cursor thereFrom the Functions list,
double-click ISBLANKDelete expression from the ISBLANK function you just inserted, but leave
your cursor thereClick the Insert Field button. Two columns appear in an overlayIn the left
column, select PositionIn the right column, select Close DateClick Insert.
IF( ISBLANK( Close_Date__c ) , value_if_true, value_if_false)
let's specify the value if our logical test evaluates to true:
Delete value_if_true from the formula, but leave your cursor thereFrom the Functions list,
double-click TODAYClick the Insert Operator button and choose SubtractClick the Insert Field
buttonIn the left column, select PositionIn the right column, select Open DateClick Insert.
let's specify the value if our logical test evaluates to false:
Delete value_if_false from the formula, but leave your cursor thereClick the Insert Field
buttonIn the left column, select PositionIn the right column, select Close Date and click
InsertClick Insert Operator and choose SubtractClick the Insert Field buttonIn the left
column, select PositionIn the right column, select Open Date and click Insert.
Now that we've gone through those steps of the procedure, note that we could have just typed
in the formula that we figured out in the last section. However, using the formula editor is a lot
easier because you don't have to
Click Check Syntax to check your formula for errorsSelect Treat blank fields as blanks, and
click NextAccept all remaining field-level security and page layout defaultsClick Save.
Introducing Relationships:
In terms of relational data, a relationship is a two-way association between two objects.
The main purpose of maintaining relations between the tables is to merge records of two
different tables.
In database,following 3 types of relations can be maintain between the tables
1) One to one 2) One to many (or) many to one 3) Many to many
Primary key:
a) It is used identify the record.
b)Primary key must be unique and not null.
Foreign key:
a) In the primary key one table is imported in another table to maintain the relations is known as
foreign key.
b) By default foreign key value must be not null
parent table:
Any independent table in the database is known as parent table.
Child table:
Any dependent table is known as child table.
Note:In the above 3 relations primary key of parent table should be made as foreign key in the
child table only
Rules to maintain one to one relation: in this scenario one record of one table can merge with
single record of other table
1)Make the primary key of parent table as foreign key in the child table.
2)Apply the validation rule on the foreign key of the child table.
PK FK
CandidateID Cname ------- Passport Location Issued date CID
No
c001 123 c 001
c 002 234 c 002
Rules to maintain one to many (or) many to one relation: in this scenario one record of one
table can merge with multiple records of other table
make the primary key of parent table as foreign key in the child table.
Rules to maintain many to many relation: In this scenario multiple records of one table can
merge with multiple records of other table
1) Create a separate table with any userdefined name(it is known as junction object.)
NOTE: Junction object acts as child table.
2) Make the primary keys of both tables as foreign keys in the junction object.
3) Junction object can have any number of columns (but it is recomended that the column either
must exist in both the parent tables or should not exist in both the parent tables)
M-M relation
Junction object: It is a child table created while maintaining many to many relation between the
object.
NOTE:Relations always can be maintained between only two tables at a time.
1)In this case child object record is not deleted 1)In this case child record is deleted whenever
even its associated parent object record is its associated parent record is deleted.
deleted. 2)It doesn‘t allows to alter the child table if that
2)It allows to alter the child table even that object contain record.
object contain records 3)It is very mandatory to store the data in
3)It is optional to store the data in foreign key foreign key field of child object.
field of child object. 4)It supports roll-up summary fields.
4)It doesn‘t support roll-up summary fields.
To create the Candidates tab, select a Tab Style in the first step of the wizard, and then accept
all the defaults until you get to the Add to Custom Apps page. On this page, select only the
Recruiting App and click Save.
Add Fields to the Candidate Object:
To create the Job Applications tab, select a Tab Style in the first step of the wizard, and then
accept all the defaults until you get to the Add to Custom Apps page. On this page, select only the
Recruiting app, and then click Save.
Review Object:
The Review object has a many-to-one relationship with the Job Application object because one
job application can have one or more reviews associated with it. A related list on the job
application record will show the associated reviews, representing the ―many‖ side of the
relationship.
Review Has a Many-to-One Relationship with Job Application
However, instead of creating this relationship with a lookup relationship field, this time we'll use
a master-detail relationship field.
A master-detail relationship field makes sense in this case because reviews lose their meaning
when taken out of the context of a job application, so we'll want to automatically delete reviews
when we delete the job application to which they're related.
Create the Review Object:
To create the Review object, from Setup, enter Objects in the Quick Find box, then select
Objects, click New Custom Object, and fill out the page according to the following table
5. Click in the Field Name text box to automatically populate it with the field name
Job_Application
6. leave the Read/Write radio button selectedClick Next.
7. Accept the defaults in the remaining three steps of the wizardClick Save.
Add Custom Fields to the Review Object:
When you're done, add a quick validation rule to ensure that the Ratings field only accepts the
numbers 1 through 5. This will keep our review rating system consistent throughout our
organization.
1. From Setup, enter Objects in the Quick Find box, then select ObjectsClick Review.
2. In the Validation Rules related list, click New.
3. In the Rule Name text box, enter Rating_Scale_Rule.
4. Select the Active checkbox.
5. Enter the following error condition formula
(Rating__c <1 || Rating__c > 5)
This formula prevents the record from being saved if the value of the Rating field is less than
one or greater than five.
In the Error Message text box,enter Invalid rating. Rating must be between 1 and 5Click Save
Many-to-Many Relationship:
In systems analysis, a many-to-many relationship is a type of cardinality that refers to
the relationshipbetween two entities A and B in which A may contain a parent instance for which
there are many children in B and vice versa.
employment websites, and we wanted to track which open positions we posted to those sites?
This would require a many-to-many relationship because:
One position could be posted on many employment websites.
One employment website could list many positions.
Here's where we get a little creative. Instead of creating a relationship field on the Position
object that directly links to the Employment Website object, we can link them using a junction
object. A junction object is a custom object with two master-detail relationships, and is the key to
making a many-to-many relationship.
Using a Job Posting Object to Create a Many-to-Many Relationship Between Positions and
Employment Websites:
In relational database terms, each job posting record is a row in the Job Posting table consisting
of a foreign key to a position record and a foreign key to an employment website record. The
following entity relationship diagram shows this relationship.
Entity Relationship Diagram for the Position, Job Posting, and Employment Website Objects
To create the Employment Website tab, select a Tab Style in the first step of the wizard, and
then accept all the defaults until you get to the Add to Custom Apps page. On this page, select
only the Recruiting App, and then click Save.
The Employment Website object needs to store the Web address of the employment website.
For that URL data type is required.That way, when users click the field, the URL will open in a
separate browser window.
In addition to the URL, since most employment websites charge per posting, to keep track of
how much it costs to post there, as well as maximum budget for posting on the site.
The next step is to create a second master-detail relationship on the Job Posting object to link it
with the Employment Website object.
Deleting a record of the secondary master object will automatically delete its associated junction
object records. So in our app, if you delete an employment website record, all of its associated job
posting records are deleted as well, even if the position is open.
8. Select Master-Detail Relationship, and click Next.
9. In the Related To drop-down list, choose Employment Website, and click Next.
10. In the Field Label text box, enter Employment Website. When you move your cursor, the
Field Name text box should be automatically populated with Employment_Website as well.
11. Click Next. Because we are creating a master-detail relationship, these settings cannot be
changed.
12. Click Next. These settings cannot be changed as well.
13. Click Next to view the final step of the wizard.
14. Accept the other defaults and click Save.
Roll-up Summary fields: A field type that automatically provides aggregate values from child
records in master-detail relationship
Roll-up Summary field can be created only on Master table in Master-Detail relationship.
A field type that automatically provides aggregate values from child records in Master-detail
relationship.
When creating a field on an object that is not relationship, the roll up summary data type is not
available. This is because Roll-up summary fields are only available in the Master object in Master
Detail relationship.
Roll-up summary field values are automatically display on the master record
The rating system we created on the Review object lets users quickly see each reviewer's
opinion of the candidate's suitability for the position. While each individual opinion is important, it
would be even better to see these ratings compiled in a way that summarizes how the candidate
did overall. For example if we could have a Total Rating field on each Job Application record that
shows the sum of all the job application's review ratings?
A simple roll-up summary field on the Job Application object can summarize data from a set of
related detail records and automatically display the output on a master record. Use roll-up
summary fields to display the sum, minimum, or maximum value of a field in a related list, or the
record count of all records listed in a related list.
Note: Formula field calculate values using fields within a single record where as roll up summary
fields calculate values from set of related records.
It is Read only field which displays SUM, MIN or MAX, COUNT value of a field in related list or
record count of all records listed in a related list
Note: When creating a field on an object(if that is not the master in a master-detail relationship)
then the Roll-Up Summary data type is not available,why because roll-up summary fields are
available only on the master object in a master-detail relationship.
1. In the Field Label enter Total RatingOnce you move your cursor, the FieldName text box
automatically populates with Total-ratingclick Next
We don't need to specify a Field to Aggregate this time since we're just counting the number of
related detail records and are not interested in any specific field
8. Leave All records should be included in the calculation selected, and click Next.
9. Accept all remaining field-level security and page layout defaultsClick Save
Both roll-up summary fields are in place now. Let's build a formula field called Average Rating
that divides the value of the first roll-up summary field by the value of the second.
1. From Setup, enter Objects in the Quick Find box, then select Objects.
2. Click Job Application.
3. In the Custom Fields & Relationships related list, click New.
4. Select the Formula data type, and click Next.
5. In the Field Label field, enter Average Rating. Once you move your cursor, the Field Name
text box automatically populates with Average_Rating.
6. Select the Number formula return type and click Next.
7. Click the Insert Field button.
8. Select Job Application>, then Total Rating, and click Insert.
9. Click the Insert Operator button and choose Divide.
10. Click the Insert Field button again.
11. Choose Job Application>,then Number of Reviews, and click Insert. Your formula should
look like this: Total_Rating__c / Number_of_Reviews__c
12. Click Next.
13. Accept the defaults in the remaining steps of the wizardClick Save.
That wraps up all the fields and relationships we need to manage our reviews. Let's quickly
organize the presentation of our fields and then test everything we've created.
Try It Out: Customize the Review Object's Page and Search Layouts
First, let's update the page layout of the Review object so that the Assessment text field is in a
single column section of the same name.
1. From Setup, enter Objects in the Quick Find box, then select Objects.
2. Click Review.
3. In the Page Layouts related list, click Edit next to Review Layout.
One to one relation between candidate and passport:
1)In the passport object create the required fields.
2)Make the candidate id (primary key)as foreign key in the child table (passport) using master
detailed relation.
3) Create a roll-up summary field in the candidate table to maintain the passport count.
4) Apply the validation rule on the passport count. If passport count is greater than error
message should be displayed like (already this candidate having passport choose another
candidate
Schema Builder:
It is used to show all the objects (both standard and custom) along with it‘s relationships in the
form of ER diagram.
Click Setup Build Schema Builder
In Schema Builder page following 2 options are available.
1. Elements: This option is available to create new objects, new fields, relationships between
objects with Drag and Drop facility.
2. Objects: It provides all the list of Standard and Custom objects, it‘s relationships in
diagrammatic format.
Note: Entity diagrams are displayed whenever the required objects are selected from the list. By
selecting Auto Layout option , all the entity diagrams are arranged automatically in proper order on
Schema Builder base
Schema Builder provides a dynamic environment for viewing and modifying all the objects and
relationships in your app. This greatly simplifies the task of designing, implementing, and
modifying your data model, or schema. Schema Builder is enabled by default.
This eliminates the need to click from page to page to find the details of a master-detail
relationship or to add a new custom field to an object in your schema.
For example, if you‘re using Schema Builder to view the details of your schema, you can add a
new custom object without leaving Schema Builder. The drag-and-drop interface lets you easily
add a custom object or new field, and saves the layout of your schema any time you move an
object.
You can view your existing schema and interactively add new custom objects, custom fields,
and relationships, simply by dragging and dropping. Schema Builder automatically implements the
changes and saves the layout of your schema any time you move an object. This eliminates the
need to click from page to page to find the details of a relationship or to add a new custom field to
an object in your schema.
Schema Builder provides details like the field values, required fields, and how objects are
related by displaying lookup and master-detail relationships. You can view the fields and
relationships for both standard and custom objects.
Schema Builder lets you add the following to your schema
Custom objects
Lookup relationships
Master-detail relationships
All custom and standard fields like
Auto Number,Formula,Roll-up Summary,Checkbox,Currency,Date,Date/Time,Email,Number,
Percent,Phone,Picklist,Picklist (Multi-Select),Text,Text Area Long Text AreaRich,TextArea
and URL
Position Object is having direct relation with Job Application but Cross relation with Review.
Job application details can be shared directly to the position and Review page layouts and vice
versa [child record directly available in parent table]
To display Position record on Review page layouts Cross object formula field is required.
Note: by default parent object records will be displayed in child object‘s page layout and child
objects name field is displayed on parent objects page layout
Cross object formula field Steps:
Step1: Select Reviews tab select Quick access menu New field
Step2: Select formula field type click Next
Step3: Give field label (Eg ; position review) (Text) as return type Next
Step4: Advanced Formula tabInsert fieldSelect ReviewSelect Job ApplicationPosition
PositionName Insert
Formula : JobApplication__r.position__r.Name
Note: ―r‖ means related field.
Step 5: Select Visible Next Save
Note:Cross Object formula fields can be applied on any Object which is having indirect relation
with another object.
What is a cross-object formula:
A Cross Object Formula is one that references data in a related record. For instance, I could
create a formula field on opportunity to display the account‘s phone number.
When the account‘s phone number gets updated, the field on opportunity automatically reflects
the change.
What‘s important to know about formulas?
Formula fields are read-only (the same is true for roll-up summary fields) for all users.For this
reason, formula fields will not be displayed when editing records. The value of the formula is only
calculated after the record is saved. This applies to cross-object formulas as well,For instance,
you can easily display the account‘s phone number on the opportunity, but you cannot edit the
phone number without returning to edit the account record.
How do you create a formula field:
Simply create a new field, and select field type ―Formula‖Then enter the return type and syntax.
Simple & Advanced Formula Editors: When editing formula syntax, there are two types of
editors,The simple editor does not provide access to cross-object formulas or functions,it is
recommend using the Advanced Formula editor, which exposes cross-object
Data Management
Salesforce provides following data management services on huge data.
1. Export data
2. Import data Using Data import wizard
3. Mass delete
4. Mass update
Step3: If Export now is selected select type of exporting select required objects start
Note : Data Exporting is like taking backup from the database.
Import Data into salesforce: salesforce gives the provisioning to import the existed data into
Salesforce.com website (in it‘s internal DB). This can be done in 2 ways.
1. Using Data import wizard
2. Using DataLoader
RN Reddy IT School Page 43
For more details contact: [email protected], Phone: +91 9866193194
Visit: www.facebook.com/groups/rnreddytechsupports
RN Reddy IT School Salesforce by Mr. Ravi
Data import wizard: By using this option maximum 50,000 records can be imported at a time.
Step1: Make the data ready in the computer in .csv format.
Step2: Setup Data Management under Administer panel Data import wizard
Summary:
To remove account or contact records that were imported, we recommend that you mass delete
accounts first. This will also delete all new contacts associated with those accounts. You can then
mass delete the newly imported contacts not associated with a new account. Restrictions
Consider the following when using mass delete.
Only administrators and users with the ―Modify All Data‖ permission can mass delete records.
You can only mass delete contacts, accounts, leads, and solutions that were added during
import. Existing records that were merely updated during import will not be deleted or cleaned up.
Mass delete does not remove notes that were added to existing records during import.
Undoing an import with Mass Delete is based on the creation time of the new records and the
alias of the user who did the import. Because of this, Mass Delete may also find records that were
created manually by that same user during the same time period.
You can only mass delete 250 records at a time. For larger imports, you can run multiple
batches for the same type of record. Instructions
Find out the beginning and ending times for the import that you want to delete. To do this, find a
record that was created during the import and has not been modified since that time. Get the time
and date in the Created By field; for example: 1/11/2009 4:37 PM. Subtract a minute or two to get
the beginning import time and add a minute or two to get the ending import time. (There is no way
to get the exact times.) If the beginning and ending import times are the same (for instance, with a
small import), subtract a minute from the beginning time and add a minute to the ending time.
From Setup, enter Mass Delete Records in the Quick Find box, then select Mass Delete
Records, and then select the appropriate record type. (For account/contact imports, remember to
mass delete accounts first.)
Enter the search criteria based on the beginning and ending import times and the alias of the
user who did the import
Click Search.
Mass Insertion(import):
Step1: Select required object from the list browse the CSV file, so that those records will be
stored or inserted click Next click OK
Step2: Map the columns as shown below.
Click create/Edit a map select Auto match fields to columns, If any field is not mapping
drag and drop manually.
Step3: To remove the mapping, click clear mapping click OK Next browse a directory
where all the success and error files will be saved Finish.
Note: Follow the above steps for Mass delete, Mass update, Mass Upsert operations on both
Standard and Custom objects.
Reports and Dashboards:
While a comprehensive set of reports is included with every organization to provide information
about standard objects, such as contacts and accounts, we can also build custom reports that
highlight interesting metrics about the data stored in our custom objects.
These are the set of records displayed to the enterprise users in a structured format so that
companies can analyze their business.
Salesforce supports Auto generation of reports and these depend on following 5 categories.
1)Report type: represents an Object for which report is required.
2)Fields: represents columns of an Object , these can be drag and dropped based on
requirement.
3)Filters: It represents conditions used to filter the records in the reports, these are categorized in
to following 4 types.
a. Field filter: It is used to add the condition based on the field.
b. Filter logic: It is used to combine more than 2 conditions using logical AND , logical OR.
c. Cross filter: It is used to display the records of one table which is having relation with other
table.
d. Row limit: It is used to filter the records based on no. Of records either in ASC or DESC
order.
Sample Report
4)Report Formats: It represents format of the report and these are categorized into following 4
types.
Tabular reports: these are the simplest and fastest way to look at your data. Similar to a
spreadsheet, they consist simply of an ordered set of fields in columns, with each matching record
listed in a row. While easy to set up, they can't be used to create groups of data or graphs.
Tip: Use tabular reports when you want a simple list or a list of items with a grand total.
Summary reports: these are similar to tabular reports, but also allow users to group rows of data,
view subtotals, and create charts. For example, in the sample Employee Interviewer reports that
appear in the following screenshot, the summary report groups the rows of reviews by the possible
values of the Owner Name field, allowing us to see at a glance subtotals of how many times the
two interviewers have talked to candidates and entered reviews for them.
While a little more time-consuming to set up, summary reports give us many more options for
manipulating and organizing the data, and, unlike tabular reports, they can be used in dashboards.
Tip: Use summary reports when you want subtotals based on the value of a particular field or
when you want to create a hierarchically grouped report, such as sales organized by year and
then by quarter.
Matrix reports: allow you to group records both by row and by column. For example, in the
following sample Employee Interviewer reports, the matrix report groups the review rows by the
possible values of the Owner Name field, and also breaks out the possible values of the Position
field into columns. Consequently, the report gives us summarized information such as the number
of times an interviewer has interviewed candidates and entered reviews for a particular position.
These reports are the most time-consuming to set up, but they also provide the most detailed view
of our data. Like summary reports, matrix reports can have graphs and be used in dashboards.
Tip:Use matrix reports when you want to see data by two different dimensions that aren't related,
such as date and product.
Joined reports: let you create different views of data from multiple report types. In a joined report,
data is organized in blocks. Each block acts like a ―sub-report,‖ with its own fields, columns,
sorting, and filtering. You can add a chart to a joined report. For example, in the following sample,
the joined report pulls data from two report types related to the Positions object. Together, the
report shows applications received from job ads posted for each position.
Tip:Use joined reports to group and show data from multiple report types in different views.
5)Folders: It represents a private or public folder where the reports can be saved,these are
categorized into following two types
My personal Custom Reports
Unified public Reports
SettingUp the Recruiting App for Reports:
Before we get started building reports, we first need to take care of a couple tasks that will make
our reports easy to find in the Recruiting app.
Add the Reports tab to the default tab display along with our Positions, Candidates, and Job
Applications tabs.
Create a folder for storing all the reports that we create.
Note:Both of above two tasks are purely optional.
To let users access your reports, make the folder that stores the reports accessible to them.
Let's create a folder to organize reports that your users can find easily.
In the Reports tab, click next to the Folders pane and choose New Report Folder.
In the Report Folder Label field, enter Recruiting Reports. Folder Unique Name autopopulates
with Recruiting_Reports. Leave this default valueClick Save.
Next to the Recruiting Reports folder, click and select Share.
Note: If you don‘t see the Share option, you just need to turn on folder sharing. From Setup, enter
Folder Sharing in the Quick Find box, then select Folder Sharing, and make sure Enable access
levels for sharing report and dashboard folders is selected.
You can share all of the contents of a report folder by selecting one of the options at the top of
the dialog: Users, Roles, Roles and Subordinates, or Public Groups. We want everyone at
organization to be able to see, but not change, the reports in this folder.
Click Roles and SubordinatesNext to CEO, click Share.
Make sure that the level selected in the Access column is Viewer. This allows all users in your
company to view this folder and the reports in it, but allows only administrators to modify the
reports inside the folder or add new reports to it.
Click Done to save our settings, and then click Close.
Create a Summary Report
To create our summary report, we'll start by opening the report builder, a powerful visual editor
for reportsOn the Reports tab, click New Report.
A report type defines the set of records and fields available to a report based on the
relationships between a primary object and its related objects.
From the Create New Report page, double click on the Other Reports category.
Objects that have a many-to-one relationship with another object, like Job Applications and
Positions, can either be selected on their own or in the context of their relationship with the other
object.
Say we want to see positions also grouped by region. While the Location field gives us city and
state, we want to group data geographically by regions, like USA, UK, and Asia Pacific. By
categorizing the location field into buckets, we get a field that can be used for the grouping.
1. Drag Location from the Field pane into the preview after Position Name.
2. Click on Location, and select Bucket this Field
3. Type Region in the Bucket Field Name.
4. Click New Bucket, type country name, and press Enter.
5. Select: cities Click Move To, and from its drop-down select country name
6. Click New Bucket, type another country name, and press Enter.
7. Add the related citiesClick OK.
In the Show drop-down, select All Position Click Add Field Filter.
Define a filter for Status equals New Position, Pending Approval, Open ApprovedClick OK.
Tip: Notice that whenever you choose a checkbox field or a picklist field, like Status, in your filter,
a lookup icon ( ) shows up next to the filter row. Click the icon to view valid values for that field
and quickly insert the ones by which you want to filter.
Using this filter of Status equals New Position, Pending Approval, Open - Approved means that
our report will include only those position records with one of these three statuses.
Adding a Grouping for a Report
Say we want to see positions also grouped by region. While the Location field gives us city and
state, we want to group data geographically by regions, like USA, UK, and Asia Pacific. By
categorizing the location field into buckets, we get a field that can be used for the grouping.
8. Drag Location from the Field pane into the preview after Position Name.
9. Click on Location, and select Bucket this Field
In the Show drop-down, select All Position Click Add Field Filter.
Define a filter for Status equals New Position, Pending Approval, Open ApprovedClick OK.
Tip: Notice that whenever you choose a checkbox field or a picklist field, like Status, in your filter,
a lookup icon ( ) shows up next to the filter row. Click the icon to view valid values for that field
and quickly insert the ones by which you want to filter.
Using this filter of Status equals New Position, Pending Approval, Open - Approved means that
our report will include only those position records with one of these three statuses.
Note that the comma between the three Status values is treated as an OR function, so this one
filter is the same as using these three filters,status equals New Position OR status equals Pending
Approval OR status equals Open-Approved
Add a Pie Chart:
The final step is to display a chart with the report. In our case, we want a pie chart.
Click Add Chart and choose the pie chart typeClick OK.
When the report is run, you have several options for viewing data. Group, summarize data by a
different field.
From the list, click the ―+‖ to expand Other ReportsSelect Positions, and click CreateFrom
the Format drop-down, select Matrix.
Specifying Groupings in a Matrix Report
Group by both rows and columns. Notice the two sets of drop zones for matrix reports.
From the Fields pane, drag Position: Owner Name to the row grouping drop zone.
Now, drag Travel Required to the column grouping drop zone.Our report now breaks out the
possible values for the Travel Required field in the columns dimension
The formula editor lets us define a new formula based on the summarizable fields in the report.
In our case, we want to include a summary that shows the percentage of position records that
require travel in any given segment. To make this calculation we need to divide the sum of records
that require travel by the sum of all records :
1. In the Column Name field, enter Travel Required Percentage
2. In the Description field, enter The percentage of total position records that require travel.
3. In the Format drop-down list, choose Percent.
4. In the Decimal Places drop-down list, choose 0.
5. For Where will this formula be displayed?, choose At all summary levels.
6. Let's write our formula. Similar to other formula editors in the platform, this provides tools to
make make it easier.
7. In the Formula section, click Summary Fields and select Travel Required and select Sum.
8. The formula editor displays the following API representation of those values
Position__c.Travel_Required__c:SUM
9. Click the Operators drop-down and select DivideClick Summary Field and select
Record Count. The final formula looks like this:
Position__c.Travel_Required__c:SUM / RowCount
10. Click Check SyntaxClick OK.
Introducing Dashboards:
It is used to display the reports in chart format so that users can able to analyze the reports very
easily.
Steps to create a new Dashboard:
1. Select Reports tab click New Dashboard
2. Select Components tab Drag & Drop one of the existing charts
3. Select Data sources tab drag & drop down object from the (specified folder) on to the
chart
4. Set the header & footer for the chart (optional).
5. Save the dashboard by clicking save provide valid title save
A dashboard shows data from source reports as visual components, which can be charts,
gauges, tables, metrics, or Visualforce pages. Each dashboard can have up to 20 components.
Users can view any dashboard available in a public folder in their organization, such as Company
Dashboards, and can select a favourite, whose first three components display on the Home tab.
Sample Recruiting Dashboard
The New Template page lets us define the email template itself. The area near the top is where
we'll generate the merge field codes for the fields in the email template below it, so let's skip past it
for now and start with the Folder drop-down list.
In the Folder drop-down list, choose Unfiled Public Email Templates.
The Unfiled Public Email Templates folder is a standard, public folder available in every
organization. By keeping the email template in a public folder, it'll be available to other users who
have permission to view and edit email templates
Select Available For Use,This option will make our email template available when we create our
email alert action.
For Email Template Name, enter Recruiting App: New Position Alert.
Tip: To help keep your email templates organized, it's a good idea to preface any template name
with the name of the app that uses it. Or, even better, you can create a public email template
folder with the name of the app, such as Recruiting App Templates, and file all the relevant email
templates in it.
Now we get to the heart of our email template—the email's subject and body text.
For Subject, enter New Open Position Alert:.
We want to put the title of the new position in the subject of our email, so we'll need to use our
first merge field here, just after the colon in our subject. To get the proper code, we'll have to go
back to the merge field area near the top of the page.
In the Select Field Type drop-down list, choose Position Fields.
Although there are many objects to choose from in the Select Field Type drop-down list,
because we're creating an email template for a workflow rule, we're limited to the fields for the
object that will be associated with that workflow—in our case, Position. That's because the
workflow rule that uses this email template won't know about any records other than the position
record that triggered the workflow rule. If we put in fields from another object, they'd be left blank in
our email.
Now let's grab the field we wantIn the Select Field drop-down list, choose Position Title.
In the Copy Merge Field Value text box, a merge field code appears for Position Title. We can
copy and paste it to the end of our subject line so the subject now looks like: New Open Position
Alert: {!Position__c.Name}. When an email is generated from this template, {!Position__c.Name}
will be replaced with the relevant position title.
Now let's finish the remainder of our email. In the email body, enter the following text.
Click Save.
That's it for our email template. Now that it's done, we just need to create the email alert that
uses our new email template.
From Setup, enter Email Alerts in the Quick Find box, then select EmailAlerts Click New Email
Alert.
provide Description and unique name is auto populated
For The process starts when, select A record changes, and then save the process.
Use the Position object to start your process and start the process when a record is created or
edited.
Let‘s define our criteria so that it sends an email alert whenever a position record is open and
approved.
Values for Creating the “New Position Notification” Criteria
Now we can add our Email Alerts actionIn the IMMEDIATE ACTIONS area, click Add Action.
Select Email Alerts
enter Action NameFor Email Alert,enter Email New Position Alert and select the Email New
Postion AlertClick Save
Creating a Process That Updates Field Values
Go the Process Builder and create a new process.
Enter Assign Position to Recruiter for the process name. Press Tab to automatically enter the
API nameenter description
The process starts when, select A record changes, and then save.
In the Set Conditions area:In the Field column select Position>Created By ID> Role ID>Name
Click Add ObjectSelect Position for the object typeQueue for the criteria nameLeave the
Conditions are met selectedSet the Operator column to Does not equalIn the Type column,
select StringIn the Value column enter RecruiterClick Add Row.
In the Field column select Position > Created By ID > Role ID > Name.
Set the Operator column to Does not equalIn the Type column, select StringIn the Value
column enter Recruiting ManagerClick Save.
Creating a Process That Assigns Tasks
From Setup, enter Process Builder in the Quick Find box, then select Process BuilderClick
NewName the process (Recruiter Tasks)
For The process starts when, select A record changes, then click Save
Let‘s start by creating our process and configuring what triggers the process to execute actions.
Click Add Object and choose Job Application for the Object type. You can type in the Object
field to filter the list of objects. For example, type Job to see objects that start with jobClick
SaveClick Add Criteria.
Enter Send Rejection Letter for the criteria nameFor the criteria for executing actions, leave
the selection as Conditions are met
In the Set Conditions area, click in the Field area to select a field on the Job Application
objectSelect Status and then click ChooseLeave the operator and type as Equals and
PicklistFor the value, select RejectedClick Save
Add a “Send Rejection Letter” Action to Your Process
To create a task and assign it to the owner of the Job Application record, you‘ll add a Create a
Record action to your process. When you add actions to a process, you have the option of
creating immediate actions (1), which execute when the process is triggered, or you can schedule
an action (2) to happen some time before or after an event, for example, one day before the
created date, or three days after the last modified date.
For now, we just need to define a single action that executes as soon as our criteria are met.
Click Add Action in the Immediate Actions area (1).
Select Create a RecordEnter Rejection Letter Task for the action nameSelect Task for the
record type. Remember, you can type to filter this list.
Notice that when you select the Task record type, some fields automatically display with empty
values. These are required fields for a Task record. You can also add values for other Task fields
that aren‘t required.
For the Priority field, set the value to HighFor the Status field, set the value to Not Started.
For the Assigned To ID field, click in the Type area and select Reference and then click in the
Value area to choose a field to reference
Reference a Field
Select Owner ID and then click ChooseLet‘s also add a subject to our task.
Click Add Row Select Subject for the fieldLeave the Type as String and enter Send
Rejection Letter for the value.
Let’s add a due date for our task
Click Add RowSelect Due Date Only for the fieldSelect Formula for the typeEnter
[Job_Application__c].CreatedDate + 1 and click Use this FormulaClick Save.
On this page we can also specify whether approval history information should be displayed on
the Approval page layout.
This information shows whether this record was submitted for approval in the past, who the
designated approvers were, and whether it was approved or rejected.
Select Display approval history information in addition to the fields selected aboveClick Next.
The last page of the New Approval Process wizard allows us to choose who should be allowed
to submit position records for approval. Again, we'll just leave the default Position Owner selected,
because there's no reason for another user to have this power.
The last two options on this page allow us to place the Approval History related list on all
Position page layouts and give users the ability to recall pending approval requests after they've
submitted them.
The Approval History related list is the same history related list that we included on the Approval
page layout, so we'll also include it on the Position detail page.
From this related list users can also click the Recall Approval Request button to withdraw their
pending approval requests.
If we didn't enable this last option, only administrators would have access to the Recall
Approval Request button.
Select Add Approval History Related List to All Position Page LayoutsSelect Allow submitters
to recall approval requestsClick Save.
Profiles: It is set of permissions assigned to users,for one user only one profile should assign but
one profile can be assigned to multiple users
Create the Recruiter Profile
1. From Setup, enter Profiles in the Quick Find box, then select Profiles.
Standard Profiles
2. Create a new profile named Recruiter based on the Standard User profile.
There are actually two ways of doing this—we can either click New Profile, select an existing
profile to clone, name it, and click Save, or we can simply click Clone in the detail page of the
profile that we want to copy, name it, and click Save.
3. In the new Recruiter profile's detail pageclick Edit.
The Recruiter edit page should look and function exactly like the Standard User profile edit page
except with one important difference: you have the ability to modify any of the permission settings.
4. In the Custom App Settings area, make the Recruiting app visible to users assigned to the
Recruiter profile, as shown in the following screenshot.
Just below the Tab Settings area, the Administrative and General User Permissions areas of the
profile allow you to grant special access to features and functionality that don't map directly to
particular objects.
give the object-level permissions.
In the Custom Object Permissions area, specify the object-level permissions for our Recruiter
profile according to the following table
Summary of Required Permissions: Recruiter
Tip:Depending on the apps that you made visible previously, you can also set additional object
permissions on standard or other custom objects
6. Click Save to create your profile and return to the profile detail page.
Introducing Permission Sets
ike a profile, a permission set is a collection of settings and permissions that determine what a
user can do. Permission sets include some of the same permissions and settings you‘ll find in
profiles.
Object permissions
Field permissions (also known as ―field-level security‖)
User permissions
Tab settings
App settings
Apex class access
Visualforce page access
permission sets based on a particular task—and even easier to assign and unassign them, so let's
define a permission set for interviewers.
Create the Hiring Manager Permission Set
We‘ve created two profiles for our easy-to-define job functions. Now we need to grant additional
access for functions that may not be specific to any given job title.
1. From Setup, enter Permission Sets in the Quick Find box, then select Permission Sets.
2. On the Permission Sets page, click New.
3. In the Label field, enter Hiring Manager.
4. The API Name field is defaulted to Hiring_Manager. Let‘s leave it as is
When you assign permission sets to a user, you can only assign permission sets that have the
same user license as the user or permission sets with no associated license. You can‘t change the
license later, so it‘s important to choose the correct user license when you create a permission set.
5. In the User License field, select SalesforceClick Save.
We‘ve taken the initial step of creating a permission set. While you can clone permission sets,
you can also create one completely from scratch,and that‘s what we did when we created this one.
At the moment, this permission set has no enabled settings or permissions—it‘s a blank slate.
So let‘s enable some permissions and settings. Since this permission set is for hiring managers,
we‘ll start by making the Recruiting app visible
1. Click Assigned Apps.
2. In the Assigned Apps page, click Edit.
3. Under Available Apps, select Recruiting and click Add to add it to the Enabled Apps list
Click Save.
Next we want to enable tab settings and permissions for our custom objects. Where are those
enabled and how do we get there? In permission sets, you have a few easy ways to move from
one page to another. Let‘s take a look
The Object Settings page shows an overview for all objects and tabs in your organization. It
includes a summary of tab settings, object permissions, and field permissions for every object and
tab. Let‘s drill down to the Positions object.
1. In the list of objects, click Positions
2. On the Positions page, click Edit.
You may notice that tab settings labels in permission sets are different from the labels in
profiles. They are configured a bit differently, but you‘ll get the same results
Create Users:
To really put our Recruiting app through its paces, we'll first need to define the rest of our users
and assign a couple of them to some of the recruiting records that we imported earlier.
Note:If you're implementing the Recruiting app in a Developer Edition organization, you'll have
only a few additional users to play with besides the System Administrator user.
Summary of Required Permissions: Recruiter and Standard Employee Profiles
1. From Setup, enter Users in the Quick Find box, then select UsersClick New User.
2. Fill out the required fields in the User edit pageFrom the Profile drop-down list, select
RecruiterClick Save
Give ownership of the DBA position and its associated job application and candidate records.
3. Click the Positions tab.
4. From the View drop-down list, select All and click Go.
Tip: If you want to see more than just the Position Title field in this view, click Edit next to the View
drop-down list and add additional fields in the Select Fields to Display section.
5. Click DBA.
6. Next to the Owner field, click Change.
7. Click the lookup icon and choose Mario Ruiz.
8. Click Save.
security and sharing rules:
Introducing Organization-Wide Defaults:
When dealing with record-level access settings, the first thing we need to do is to determine the
organization-wide defaults (commonly called ―org-wide defaults‖) for each object in our Recruiting
app. Also called a sharing model, org-wide defaults specify the baseline level of access that the
most restricted user should have.
We'll use org-wide defaults to lock down our data to this most restrictive level, and then we'll use
our other record-level security and sharing tools (role hierarchies, sharing rules, and manual
sharing) to open up the data to other users who need to access it.
Org-Wide Defaults in Our Recruiting App:
To determine the org-wide defaults that we'll need in our Recruiting app, we need to answer the
following questions for each object
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?
Based on our answers to these questions, we can determine the sharing model that we need for
that object as illustrated in the following diagram
Determining the Sharing Model for an Object
Role hierarchies don't necessarily need to match your org chart exactly. Instead, each role in
the hierarchy should just represent a level of data access that a user or group of users needs.
For example, suppose your organization employs a corporate lawyer who needs to access all of
the records in the app. One easy way to accomplish this is by assigning the lawyer to the CEO
role in your organization's role hierarchy. Since the CEO role is placed at the top of the hierarchy,
anyone assigned to that role automatically gets full access to any record in the organization. It
doesn't matter that technically the lawyer appears below the CEO in the regular org chart.
Comparing Roles,Profiles and Permission Sets:
Although it's easy to confuse profiles and permission sets with roles, they actually control two
very different things.
As we learned earlier in this chapter, profiles and permission sets control a user's object- and
field-level access permissions. Indeed, a user can't be defined without being assigned to a
particular profile, since the profile specifies the most basic access for users.
Roles, on the other hand, primarily control a user's record-level access permissions through role
hierarchy and sharing rules. Although a role assignment isn't exactly required when we define a
user, it would be foolish of us not to assign a role since it makes it so much easier to define our
record-level permissions.
Indeed, trying to define record-level permissions without assigning a role to a user would be a
lot like trying to travel from New York to San Francisco by car when there's an airplane available—
there's just a much more efficient way of doing it!
To help you remember which controls what, remember: Roles control Records
Define a Role Hierarchy:
Implementing a role hierarchy in the platform is easy once you have an idea of what the
hierarchy should look like. It's best to start with your company's org chart and then consolidate
different job titles into single roles wherever possible. For example, if Ben Stuart's software
development group has a staff software engineer and a junior software engineer, these positions
can be consolidated into a single Software Engineer role in the hierarchy.
Once that's squared away, we can get started defining the role hierarchy itself. For our exercise,
we'll use the role hierarchy we talked about previously.
From Setup, enter Roles in the Quick Find box, then select Roles. If you see an introductory
splash page called Understanding Roles, click Set Up Roles at the bottom of the page to skip to
the actual tool.
Empty Role Hierarchy Page in Tree View Mode
The default view for this page is the tree view, as indicated in the drop-down list on the far right
side of the Role Hierarchy title bar.
When creating a role hierarchy, it's probably easiest to stick with this or the list view, because
they both make it easy to see how the roles all fit together in the hierarchy.
The sorted list view is best if you know the name of a role that you want to find but aren't sure
where it fits in the hierarchy, or if you don't want to click open all the tree nodes. For our purposes,
we'll stick with the tree view.
When you first start defining a role hierarchy, the tree view displays a single placeholder node
with the name of your organization. From this point, we need to add the name of the role that is
highest up in the hierarchy—in our case, the CEO.
Note: If you're building your Recruiting app with a free Developer Edition organization, you may
have a role hierarchy predefined as a sample. That's alright. You can still follow along and create
some more roles.
Just under the name of your organizationclick Add Role.
Note: If the CEO role already exists, click Edit.
In the Label text box, enter CEO. The Role Name text box autopopulates with CEO.
In the This role reports to text box, click the lookup icon and click Select next to the name of
your organization
By choosing the name of the organization in the This role reports to text box, we're indicating
that the CEO role is a top-level position in our role hierarchy and doesn't report to anyone.
In the Role Name as displayed on reports text box, enter CEO. This text is used in reports to
indicate the name of a role.Since you may not want a long role name, like Vice President of
Product Development, taking up too much space in your report columns, it's advisable to use a
shortened, yet easily identifiable, abbreviation
Leave any other options, such as Opportunity Access, set to their defaults. These access
options don't have anything to do with our Recruiting app, and only appear if you have the org-
wide defaults for a standard object set to a level more restrictive than Public Read/Write.
Click Save.
Now that we've created our first role, we can assign the appropriate user to it.
Click CEO to open the CEO role detail pageIn the CEO role detail page, click Assign Users to
RoleIn the Available Users drop-down list, select All Unassigned.
Choose a user from the list (in our case, Cynthia Capobianco), and click Add to move her to
theSelected Users for CEO listClick Save.
If we return to the main Roles page from Setup by entering Roles in the Quick Find box, then
selecting Roles, we can now see our new CEO role in the hierarchy
Note: If you see the Sample Role Hierarchy image, click Set Up Roles.
Define the rest of the roles according to the Role Hierarchy diagram.
Tip: To speed up the process of adding a new role, click Add Role directly under the name of the
role to which the new role should report. When you do this, the This role reports to text box is
automatically filled in with the name of the appropriate role.
Field-Level Security:
In the platform, we control access to individual fields with field-level security. Field-level security
controls whether a user can see, edit, and delete the value for a particular field on an object.
Unlike page layouts, which only control the visibility of fields on detail and edit pages, field-level
security controls the visibility of fields in any part of the app, including related lists, list views,
reports, and search results.
Field-Level Security in Our Recruiting App:
Just to refresh our memories about what field-level security settings we need for our Recruiting
app, let‘s take another look at our required permissions in the following table.
We‘ll keep them organized by recruiter, hiring manager, and standard employee, because it
turns out that field-level security settings are closely related to profiles and permission sets
Revised Summary of Required Permissions
Recruiter Hiring Manager Standard Employee
Position Read Create Edit Read Create Edit* Read (No min/max pay)
Candidate Read Create Edit Read* (No SSN) Read* (No SSN)
Job Application Read Create Edit Read Edit (No lookup Read*
fields)
Review Read Create Edit Read Create Edit Read** Create Edit**
Only for those records that are associated with a position to which the hiring manager/
interviewer has been assigned
Only for those records that the interviewer owns
For field-level security settings, we‘ll first zero in on those rules that include field restrictions in
parentheses, specifically:
On the Position object, hide minimum and maximum pay from standard employees and
interviewers
On the Candidate object, hide social security numbers from hiring managers and interviewers
On the Job Application object, make the Position and Candidate lookup fields read-only for
hiring managers
Limit Access to Fields in the Standard Employee Profile
1. From Setup, enter Profiles in the Quick Find box, then select Profiles, and select the
Standard Employee profile
Standard Employee Profile Detail Page
2. In the Field-Level Security area, click View next to the Position objectClick Edit.
After doing this exercise, it's easy to see that most fields are editable, because their Visible
checkbox is the only one selected.
To restrict a field from ever being viewed by a user, all we have to do is deselect both
checkboxes
Next to the Max Pay field, deselect Visible.
Next to the Min Pay field, deselect Visible.
Click Save.
Now let‘s take care of the remaining field-level security rules. Again, since we know that our
interviewers and hiring managers will be assigned the Standard Employee profile, we‘ll ensure that
its field permissions are set correctly
Click Back to Profile.
In the Field-Level Security area, click View next to the Candidate object.
Click Edit.
Next to the SSN field, deselect Visible.
Click Save.
Click Back to Profile.
In the Field-Level Security area, click View next to the Job Application object.
Click Edit.
RN Reddy IT School Page 83
For more details contact: [email protected], Phone: +91 9866193194
Visit: www.facebook.com/groups/rnreddytechsupports
RN Reddy IT School Salesforce by Mr. Ravi