Blog-2
Salesforce Administration Study Notes
- July 16, 2024
- Posted by: Peoplewoo Skills
- Category: Administrator
Salesforce introduction
🡺Salesforce is a cloud based
🡺Salesforce was designed by salesforce dot com [SFDC] company to design the automated CRM applications, enterprise applications and web Applications
🡺Salesforce supports application development, application testing, application deployment and application integration
Software: Software is a collection of programs and it is categorized into different types.
CRM [Customer Relationship Management]
CRM is the word can find in the business firms (These are the small business units that will do business). Business firms are categorized into following three types
- Small-scale business firm.
- Medium-scale business firm.
- Large-scale business firm.
Note: For every business firm following three departments are available.
- Marketing Dept
- Sales Dept
- Customer Dept (Customer Care).
1. Marketing Dept: This department will advertise about the products (Campaigning) to gather the customers.
2. Sales Dept: This Dept will take care about selling of products.
3. Customer Support Dept: This dept will give the back end support for the customers after selling the product so that customer can have some positive feedback on business firm and they can maintain relation with the company in future.
🡺Combination of above services [marketing, sales and customer support] is knows as CRM.
🡺 The main aim of CRM is to maintain the business relation between customer and business firms
🡺Salesfore is predefined platform used to design the CRM Apps that means it is used to design the application for the business firm to automate the CRM process. (Online marketing, online sales, online customer support with fully automation).
🡺Mainly CRM Apps can be designed for the business firms and these applications can be used by employees of business firms (Enterprise users).
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
- SAAS (Software as a Service)
- PAAS (platform as a Service)
- 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
- Server accepts the request from client.
- Perform some operation based on request.
- Return response back to the client
🡺SAAS is available in following 2 ways
- Free Services.
- 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:
- no need to maintain Server and database in the premises of Business firms.
- Maintains cost will be reduced.
- 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.
- Summer release.
- Spring release.
- Winter release.
Advantages of salesforce compared to other CRM software
- It supports to design the enterprise applications for small, Medium, Large Scale business firms.
- Sales Force provides all cloud services for both developer and business firms, so that maintenance cost and burden is reduced.
- Sales Force is very strong in integration with other application.
- Sales Force internally taken care about the security.
Sales Force Operations:
- Development.
- a) Configuration.
- b) Customization
- Testing
- Deployment
- Integration
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
- Visual Force: It is similar to HTML used to design the web pages and these can be used by employees of business firm.
- 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.
- Testing: SFDC provides sand box environment for testing of Apps automatically.
- Deployment: Sales Force provides in built deployment environment. So that applications can be deployed in real time servers (which was provided by salesforce.com).
- Integration: Sales Force provides pre defined API to integrate the CRM Application with external applications very easily.
Technical words in salesforce
- App 🡺 Application.
- org 🡺 Organization.
- Standard 🡺 Predefined.
- Custom 🡺 user defined.
- Object 🡺 Table.
- Field 🡺 Column.
- Record 🡺 A row in a table.
- Tab 🡺 short cut to view the table and it‘s records.
- Page layout 🡺 web page.
- SOQL 🡺 Salesforce object query language
Recruitment Application requirements in salesforce
- Track positions in all stages of the process, from those that are open to those that have been filled or canceled.
- Track all of the candidates who apply for a particular position, including the status of their application (whether they’ve had a phone screen, are scheduled for interviews, have been rejected or hired, or have passed on an offer that was presented).
- Track the posting of jobs on external employment websites, such as Monster.com.
- Allow employees to post reviews for candidates whom they’ve interviewed.
- Provide security for the recruiting data so that it’s not mistakenly viewed, edited, or deleted by employees who shouldn’t have access.
- Automatically inform the relevant recruiter about the next steps that should be taken when a decision has been made about an applicant.
- Automatically inform all employees of new positions that have been posted.
- Make sure that a new job opening has executive approval before it becomes active.
- Include reports that give users an overview of recruiting status.
- Allow recruiters to map the locations of all candidates who are applying for a position, to better
- Understand relocation expenses.
- Make it easy to perform several similar tasks at once, like rejecting multiple job applications.
- Automatically post open positions on company‘s public website.
Note: an app that meets these requirements is going to greatly increase the efficiency of Company’s recruiting and hiring processes
Custom objects of Recruiting application: [Tables]
- Position.
- Candidate.
- EmploymentWebsite.
- JobApplication(junction object for position and candidate Many-Many relationship).
- Review(JobApplication to Review 1-M relationship).
- JobPosting (junction object between Position and EmploymentWebsite M-M relationship).
- Passport(Candidate to Passport 1-1 relationship).
1. Fields of Position Object (columns):
- PositionName🡪text( standard field generated at the time of creation of object).
- JobDescription🡪textarea.
- MinPay🡪currency.
- MaxPay🡪currency.
- OpenDate🡪Date.
- CloseDate🡪Date.
- Status🡪picklist.
- SkillsRequired🡪 textarea(long).
- TravelRequired🡪checkbox .
- Location🡪picklist.
- DaysOpened🡪formula.
2. Fields of Candidate Object (columns):
- CandidateID🡪autonumber (standard field generated at the time of creation of object).
- FirstName🡪text.
- LstName🡪text.
- Phone🡪phone.
- Email🡪email.
- Address🡪textarea.
- Experience🡪number.
- CurrentlyEmployed🡪checkbox.
- Salary🡪currency.
- DOB🡪date.
- Age🡪number [formula]
3. Fields of EmploymentWebsite:
- EmploymentWebsiteName🡪text(standard field generated at the time of creation of object).
- Websiteaddress🡪url.
- Priceperpost🡪currency.
- MaximumBudget🡪currency.
4. Fields of JobAppliaction: [many to many relation of Candidate and Position].
- jobapplicationID🡪autonumber (standard field generated at the time of creation of object).
- Position🡪lookup.
- Candidate🡪lookup.
- CoverLetter🡪textarea.
- JAStatus🡪picklist
5. Fields of JobPosting object: [many to many relation of Position and EmploymentWebsite].
- JobpostingID🡪autonumber (standard field generated at the time of creation of object).
- Position🡪master-detail.
- Employmentwebsite🡪 master-detail.
6. Fields of Review:
- RevieweID🡪autonumber(standard field generated at the time of creation of object).
- Rating🡪number.
- Reviewmessage🡪text area.
- JobApplication🡪master-detail
7. Fields of Passport(table):
- PassportID🡪autonumber(standard field generated at the time of creation of object).
- PassportNumber🡪number.
- IssueDate🡪date.
- ExpiryDate🡪date.
- IssuedLocation🡪text.
- Candidate🡪(master-detail relation).
Note: validation rules can be applied on any object based on requirement.
Salesforce Admin Material
Creation of custom application:
- Click the Setup link in the header.
- 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.
- Click New button🡺 The New Custom App wizard appears.
- If you are a new user, select Custom app.
- In the App Label field, enter Recruiting (any application name).
- Click your mouse inside the App Name field🡺 In the Description field, provide some description (optional) 🡺 Click Next.
- The next screen in the New Custom App wizard allows you to specify the image file to use for this app’s logo. Whenever the app is selected in the Force.com app menu, this logo appears in the upper-left corner of all pages. (Optional) 🡺click Next.
Creation of Custom Object[Table Name]:
- From Setup🡺expand create in build option🡺select Objects🡺click New Custom Object🡺In the Label field, enter Position(ObjectName) 🡺In the Plural Label field, enter Positions🡺The Object Name field is defaulted to Position. Let’s leave as it is.
- Select AllowReports, AllowActivities, Track FieldHistory, Allow in chattergroups options.
- Select launch new custom tab wizard option🡺click save button.
- Select object and tab style🡺click Next button.
- Choose the user profiles for which the new custom tab will be available🡺 click Next.
- 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:
- From Setup🡺enter Objects in the Quick Find box🡺select Objects🡪Click Position.
- In the Custom Fields & Relationships related list, click New
- Choose the Text Area (Long) data type, and click Next
- In the Field Label, enter Job Description(any name)
- Enter Length and Visible Lines field value
- Click Next🡺Click Next🡺Click 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.
Add Currency Fields:
🡺To keep track of a position’s salary range, we need to add two currency fields MinPay and MaxPay. Note that unlike some fields, once we define these as currency fields, we won’t be able to change them to any other type. Defining a currency field is almost identical to defining a text field, with a few slight differences.
🡺The Length of a currency field actually corresponds to the number of digits to the left of the decimal point. An additional Decimal Places field handles the number of digits that should be displayed to the right.
🡺In the Details page of the wizard, a new checkbox called required is displayed. We can select this option if we want to force our users to enter a value for this field when creating a new position.
Add Checkbox Fields:
🡺Add Checkbox Fields Here is some easy ones. The Position object requires a checkbox field travel required for the position (Note that similar to currency fields, once you define a field as a checkbox, you can’t change it to any other type.)
Add Date Fields:
🡺Date fields to our Recruiting app to track the date a position opens, the date it closes, and the date by which it should be filled. Date fields are automatically include a popup calendar interface from which users can select a day without any typing.
Add Picklists: Picklist field is like drop down menu
- Click Position tab🡺In the Custom Fields🡺 click New🡺Select the Picklist data type🡺click next🡺In the Field Label, enter Location.
- In the large text area box just below, enter the picklist values like Hyderabad, Bangalore, Chennai, Delhi, Mumbai, Pune etc…
- Select the Use first value as default value checkbox. This option allows us to populate the field with a default value. If you select it, the field defaults to the first value that you specify in the list of possible picklist values
- Accept all other default settings for field-level security and page layouts🡺Click Save
- In the similar way number,email,phone etc… datatypes can be assigned to fields
Email: email fields in our recruitment applicationAllows candidates to enter an email address of up to 80 characters, which is validated to ensure proper format.
- Click candidate table🡪in the custom fields🡪click new🡪select the email data type🡪click next🡪in the field label enter valid data.
- Select the unique checkbox because email ID is always unique.
- Accept all other default settings for field level security and page layouts🡪click save.
Addphone fields:Phone fields contain phone numbers, which can include alphabetic characters. Client applications are responsible for phone number formatting.
- 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.
- Click employment website tab 🡪in the custom fields🡪click new🡪select the URL data type🡪click next in the field label enter website address.it allows 255 characters only.
- accept all the other default settings for field level security and page layouts🡪click save.
Define a Validation Rule for Min and Max Pay:
- Min Pay should never be greater than Max Pay.
- From the Positions tab, click to open the quick access menu (if it is not open already).
- Hover over View Validation Rules🡺click New🡺In 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..
- Select the Active checkbox🡺provide the description🡺Click the Insert Field button🡺In the left column, select Position🡺In the right column, select MinPay🡺Click Insert🡺Click the Insert Operator button🡺choose Greater Than..
- Click the Insert Field button once again🡺In the left column, select Position🡺In the right column, select MaxPay🡺Click Insert.
Note: error condition formula that looks like: Min_Pay c > Max_Pay c
- In the Error Message enter Min Pay cannot exceed Max Pay🡺Select the Location of error message🡪click Save.
Introducing Page Layouts:
🡺A page layout controls the position and organization of the fields and related lists that are visible to users when viewing a record.
🡺Page layouts also help us control the visibility and editability of the fields on a record very easily. The Force.com platform has drag-and-drop tool for editing page layouts
Page layout of the Position object:
🡺From Setup, enter Objects in the Quick Find box, then select Objects🡺Click Position.
🡺In the Page Layouts related list, click new 🡺provide Position Layout (any name)
Group Fields into a New Section:
🡺On a page layout, a section is simply an area where we can group similar fields under an appropriate heading.
🡺This makes it easy for our users to quickly identify and enter the information for a record, especially if our object has a large number of fields:
🡺In the palette, select the Fields category
🡺Drag the Section user interface element from the palette to just above the System Information section on the page layout. When you drag a new section on to the page layout, the Section Properties popup window appears.
🡺In the Section Name, enter Compensation(any name). The Section Name field controls the text that’s displayed as the heading for the section.
🡺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.
Introducing Custom Formula Fields:
🡺we can use custom formula fields to define calculations that are specific to our Recruiting app. Calculating How Long a Position Has Been Open:
🡺A custom formula field that calculates how many days a position has been open. To do this, let’s first think about the logic that we should use to define the field, and then we can go through the process of creating it in our Recruiting app.
🡺we need to know the current date and the date the position was created. If we could somehow subtract these two, we’d have the number of days that the position has been open. Fortunately, it’s easy to get both of these values.
🡺For the current date, we can use the platform’s built-in TODAY() function. TODAY() returns today’s date.
🡺For the date that the position was opened, we can use the Open Date field that we defined in the last chapter.
🡺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
🡺Select the Formula data type, and click Next.
🡺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 there🡪From the Functions list, double-click ISBLANK🡪Delete expression from the ISBLANK function you just inserted, but leave your cursor there🡪Click the Insert Field button. Two columns appear in an overlay🡪In the left column, select Position🡪In the right column, select Close Date🡪Click 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 there🡪From the Functions list, double-click TODAY🡪Click the Insert Operator button and choose Subtract🡪Click the Insert Field button🡪In the left column, select Position🡪In the right column, select Open Date🡪Click Insert.
let’s specify the value if our logical test evaluates to false:
🡺Delete value_if_false from the formula, but leave your cursor there🡪Click the Insert Field button🡪In the left column, select Position🡪In the right column, select Close Date and click Insert🡪Click Insert Operator and choose Subtract🡪Click the Insert Field button🡪In the left column, select Position🡪In 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 errors🡪Select Treat blank fields as blanks, and click Next🡪Accept all remaining field-level security and page layout defaults🡪Click 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
One to one 2) One to many (or) many to one 3) Many to many Primary key:
-
- It is used identify the record.
- Primary key must be unique and not null.
Foreign key:
- In the primary key one table is imported in another table to maintain the relations is known as foreign key.
- 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
- Make the primary key of parent table as foreign key in the child table.
- Apply the validation rule on the foreign key of the child table.
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
- Create a separate table with any userdefined name(it is known as junction object.).
NOTE: Junction object acts as child table.
- Make the primary keys of both tables as foreign keys in the junction object.
- 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).
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.
Types of relations in salesforce:[approches]
- Salesforce allows to maintain 1 to 1 ,one to many and many to many relations practically by following any of two approaches.
- Lookup relation
- Master-detail relation
Differences between look-up and master detailed relation:
Relationships Allow Information about Other Object Records to be Displayed on a Record Detail Page:
Introducing Relationship Custom Fields:
🡺we can define a relationship between two objects through the use of common fields. On the platform, we can define relationships between objects by creating a relationship custom field that associates one object with another.
🡺A relationship field is a custom field on an object record that contains a link to another record.
🡺There are different types of relationship fields, each with different implications. The simplest and most flexible type is a lookup relationship field, which creates a simple relationship between two objects.
🡺For example, if we place a lookup relationship field on a Job Application object that references position records, many job application records can be related to a single position record. This will be reflected both with a new Position field on the job application record and with a new Job Applications related list on the position record.
🡺You can also put multiple lookup relationship fields on a single object, which means that our Job Application object can also point to a Candidate object.
🡺A second type of relationship field, master-detail relationship, is a bit more complex, but more powerful. Master-detail relationships create a special parent-child relationship between objects: the object on which you create the master-detail relationship field is the child or ―detail,‖ and the object referenced in the field is the parent or ―master.‖
🡺In a master-detail relationship, the ownership and sharing of detail records are determined by the master record, and when you delete the master record, all of its detail records are automatically deleted along with it.
🡺Master-detail relationship fields are always required on detail records, and once you set a master-detail relationship field’s value, you can’t change it.
🡺When do you use a master-detail relationship? If you have an object that derives its significance from another object. For example, say you have a Review custom object that contains an interviewer’s feedback on a job application. If you delete a job application record, you will probably want all of its review records deleted as well, being that reviews of something that no longer exists aren’t very useful. In this case, you want to create a master-detail relationship on the Review custom object with the Job Application object as the master object.
Create the Candidate Object:
🡺To create the Candidates tab, select a Tab Style in the first step of the wizard, and then accept all the defaults until you get to the Add to Custom Apps page. On this page, select only the Recruiting App and click Save.
Add Fields to the Candidate Object:
Bringing Candidates and Positions Together with Job Applications:
🡺Our app can track candidates and open positions, We can create lookup relationship fields on the Candidate object that let recruiters specify the positions in which the candidate is interested, but what if we want to track additional information, such as whether the candidate is currently scheduled to interview for one of those positions
🡺We can satisfy these requirements with a Job Application custom object that stores data about an individual candidate’s application to a single position. Each time a candidate wants to apply for a position, the recruiter can create a job application record that contains the candidate’s name and the position to which he or she is applying,
Create the Job Application Object:
Bringing Candidates and Positions Together with Job Applications:
🡺Our app can track candidates and open positions, We can create lookup relationship fields on the Candidate object that let recruiters specify the positions in which the candidate is interested, but what if we want to track additional information, such as whether the candidate is currently scheduled to interview for one of those positions
🡺We can satisfy these requirements with a Job Application custom object that stores data about an individual candidate’s application to a single position. Each time a candidate wants to apply for a position, the recruiter can create a job application record that contains the candidate’s name and the position to which he or she is applying,
Create the Job Application 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.
Default Candidate Lookup on the Job Application Object:
Add Fields to the Candidate Lookup Dialog:
- From Setup, enter Objects in the Quick Find box, then select Objects🡺Click Candidate.
- In the Search Layouts related list, click Edit next to the Lookup Dialogs layout.
🡺The Edit Search Layout page includes a list of available fields from the Candidate object. You can choose up to ten fields to include in the lookup dialog, and order them in any way you choose, except that the object’s unique name or number field (such as Candidate Name) must be listed first.
- Move the following fields into the Selected Fields box under Candidate Name: First Name, Last Name, City, State/Province, Phone🡺Click Save.
🡺return to the Job Applications tab, and click New. When you click the lookup icon next to the Candidate field, the dialog is now much more useful.
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.
Add Fields to the Review Object:
🡺Let’s start by adding the master-detail relationship field, which will relate our Review object with the Job Application object. To create the master-detail relationship field, access the Review object detail page.
- From Setup, enter Objects in the Quick Find box, then select Objects🡺Click Review.
- In the Custom Fields & Relationships related list, click New.
- Select Master-Detail Relationship, and click Next.
- In the Related To drop-down list, choose Job Application🡪 click Next.
- Click in the Field Name text box to automatically populate it with the field name Job_Application
- leave the Read/Write radio button selected🡪Click Next.
- Accept the defaults in the remaining three steps of the wizard🡪Click 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.
- From Setup, enter Objects in the Quick Find box, then select Objects🡺Click Review.
- In the Validation Rules related list, click New.
- In the Rule Name text box, enter Rating_Scale_Rule.
- Select the Active checkbox.
- 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 5🡪Click 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
🡺Consequently, in order to define a many-to-many relationship between the Position and Employment Website objects, we’ll need to create a Job Posting object with the following fields:
- A Position master-detail relationship
- An Employment Website master-detail relationship
Create the Employment Website Object:
🡺Consequently, in order to define a many-to-many relationship between the Position and Employment Website objects, we’ll need to create a Job Posting object with the following fields:
- A Position master-detail relationship
- An Employment Website master-detail relationship
Create the Employment Website Object:
🡺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.
Add the URL Field to the Employment Website Object:
🡺From Setup, enter Objects in the Quick Find box, then select Objects, and then click Employment Website to view its detail page.
🡺In the Custom Fields & Relationships related list, use the New button to create three custom fields according to the following table.
🡺Where necessary, we’ve indicated some additional values you’ll need to fill in when creating the fields. Otherwise you can simply accept all defaults.
Add Custom Fields to the Employment Website Object:
🡺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.
Create the Job Posting 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.
Add Fields to the Job Posting Object:
🡺To turn the Job Posting object into the junction object that relates the Position and Employment Website objects, we’ll need to add two master-detail relationship fields.
🡺The first master-detail relationship will be the primary relationship. The detail and edit pages of our junction object (Job Posting) will use the color and any associated icon of the primary master object (Position).
🡺In addition, the junction object records will inherit the value of the Owner field and sharing settings from their associated primary master record.
- From Setup, enter Objects in the Quick Find box, then select Objects🡺Click Job Posting.
- In the Custom Fields & Relationships related list, click New.
- Select Master-Detail Relationship, and click Next.
- In the Related To drop-down list, choose Position, and click Next.
- In the Field Label text box, enter Position. When you move your cursor, the Field Name text box should be automatically populated with Position as well.
- Accept the remaining defaults, and click Next until you reach the final step of the wizard.
- Accept the other defaults and click Save & New.
🡺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.
- Select Master-Detail Relationship, and click Next.
- In the Related To drop-down list, choose Employment Website, and click Next.
- 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.
- Click Next. Because we are creating a master-detail relationship, these settings cannot be changed.
- Click Next. These settings cannot be changed as well.
- Click Next to view the final step of the wizard.
- 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.
Create Roll-Up Summary Fields:
Begin creating your roll-up summary just as you create any other custom field:
- In the Field Label enter Total Rating🡪Once you move your cursor, the FieldName text box automatically populates with Total-rating🡪click Next
- In the Summarized Object drop-down list, choose Reviews.
- Under Select Roll-Up Type, select SUM.
- In the Field to Aggregate drop-down list, select Rating.
- LeaveAll records should be included in the calculationselected, andclick Next.
- Accept all remaining field-level security and page layout defaults🡪Click Save.
🡺Roll-up summary fields themselves don’t allow you to average values together, but you can use them in formulas that do
🡺Let’s create a second roll-up summary field on the Job Application object, and then build a simple formula field that uses both roll-up summary fields to find the average rating
- From Setup, enter Objects in the Quick Find box, then select Objects.
- Click Job Application.
- In the Custom Fields & Relationships related list, click New.
- Select the Roll-Up Summary data type, and click Next.
- In the Field Label field, enter Number of Reviews. Once you move your cursor, the Field Name text box automatically populates with Number_of_Reviews🡪Click Next.
- In the Summarized Object drop-down list, choose Reviews.
- Under Select Roll-Up Type, select COUNT.
🡺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
- Leave All records should be included in the calculation selected, and click Next.
- Accept all remaining field-level security and page layout defaults🡪Click 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.
- From Setup, enter Objects in the Quick Find box, then select Objects.
- Click Job Application.
- In the Custom Fields & Relationships related list, click New.
- Select the Formula data type, and click Next.
- In the Field Label field, enter Average Rating. Once you move your cursor, the Field Name text box automatically populates with Average_Rating.
- Select the Number formula return type and click Next.
- Click the Insert Field button.
- Select Job Application>, then Total Rating, and click Insert.
- Click the Insert Operator button and choose Divide.
- Click the Insert Field button again.
- Choose Job Application>,then Number of Reviews, and click Insert. Your formula should look like this: Total_Rating c / Number_of_Reviews c Click Next.
- Accept the defaults in the remaining steps of the wizard🡪Click 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.
- From Setup, enter Objects in the Quick Find box, then select Objects.
- Click Review.
- In the Page Layouts related list, click Edit next to Review Layout.
One to one relation between candidate and passport:
- In the passport object create the required fields.
- Make the candidate id (primary key)as foreign key in the child table (passport) using master detailed relation.
- Create a roll-up summary field in the candidate table to maintain the passport count.
- 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.
- Elements: This option is available to create new objects, new fields, relationships between objects with Drag and Drop facility.
- 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
Cross Object Formula field:
🡺Cross object represents a table which is having indirect relation with other object. That means following diagram shows the cross object relation.
🡺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 tab🡪Insert field🡪Select Review🡪Select Job Application🡪Position🡪 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.
- Export data
- Import data Using Data import wizard
- Mass delete
- Mass update
Exporting data from Salesforce:
🡺This option will prepare a copy of all the organisation data which is available in salesforce.com and this data will be exported either manually or schedule it to run automatically.
🡺When the export is ready for download that user will receive an email containing a link that allows you to download the files.
🡺The export files are also available on this page (in salesforce.com) for 48hours and after that they will get deleted automatically
Steps to export the data:
Step1: Setup 🡪 Administer 🡪 Data management🡪 Data export
Step 2: Select either Export now or Schedule export
- Export now is for immediate backup.
- Schedule export is for Auto backup based on date and time.
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.
- Using Data import wizard.
- Using DataLoader.
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.
Step3: Click Launch Wizard.
Step4: Select required object in Col1 (Standard or Custom objects)
Step5: Select Add new records in col2
Step6: Click on CSV in col3 🡪 choose .csv file (which was already created) 🡪 Next
Step7: Map the field names of Salesforce Object and CSV file 🡪 Next(Use the drop-down lists to specify the Salesforce fields that correspond to the columns in your import file. For your convenience, identically matching labels are automatically selected)
Note: Unmapped fields will not be imported
Step8: Click Start import.
Note: To view all the imported records, select the related tab 🡪 click GO(Once the import operations have completed, return to the Positions, Candidates, or Job Applications tab and click Go! next to the View drop-down list. You’ll see a list of all the new records you just imported)
Mass delete:(only on standard tables)
🡺If you or another user imported records incorrectly into Salesforce, you can use the mass delete feature to remove these records.Undo Imports with Mass Delete Recommendations
goto setup🡪 expand Data management🡪 select mass delete records.
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.
Note: It is recommended to perform mass deletion,updation,import and export operations using DataLoader
Data Loader: It is used to perform Mass insertion, mass update, mass delete, mass upsert, import,export and export all operations on huge no. of records. (No limit on records).
Step1: Setup 🡪 Data management under Administer panel🡪 Data Loader
Step2: Download Data loader software from given link.
Step3: Open Dataloader from Run command there INSERT(import),UPDATE,UPSERT,DELETE, EXPORT and EXPORTALL options are available.
Note: It‘s very mandatory to install JDK8 software before installing Data Loader
Step4: While working with Data loader for 1st time, it is mandatory to login by selecting Password Authentication.
User name 🡪 Salesforce username
Password 🡪 Salesforce password + security token
Step5: Generation of Security token
In force.com 🡪 select profile name (user name) 🡪 My settings 🡪 personal (on left side) 🡪
Reset My Security Token 🡪 reset security token
Note: Security token will be sent to registered mail id.
Step6: Provide password and token in Authenticated location 🡪 login 🡪 Next
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.
- Report type: represents an Object for which report is required.
- Fields: represents columns of an Object , these can be drag and dropped based on requirement.
- Filters: It represents conditions used to filter the records in the reports, these are categorized in to following 4 types.
- Field filter: It is used to add the condition based on the field.
- Filter logic: It is used to combine more than 2 conditions using logical AND , logical OR.
- Cross filter: It is used to display the records of one table which is having relation with other table.
- Row limit: It is used to filter the records based on no. Of records either in ASC or DESC order.
Sample Report
- 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.
- 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.
Add the Reports Tab
🡺Add the Reports tab to the set of default tabs that are displayed for every Recruiting app user.
Setup🡪enter Apps in the Quick Find box, then select Apps🡪Click Edit next to the Recruiting app🡪In the Choose the Tabs section, add Reports to the Selected Tabs list.
🡺Optionally,select Overwrite users personal custom app customizations,if you choose this option, the Reports tab is automatically added to the tab bar by default for all users 🡪Click Save.
Create a Recruiting Reports Folder
🡺On the Reports tab, you see recently viewed reports and dashboards organized in report or dashboard folders.
Unfiled Public Reports is a standard folder all users can access. As an administrator, you can store reports in that folder to share with everyone in your organization. You can make any other folder public, by sharing it with all users.
Personal folders such as Personal Custom Reports and Personal Dashboards are an exception. They contain reports or dashboards private to each user and can‘t be accessed by others.
The Reports Tab and Folders
🡺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 value🡪Click 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 Subordinates🡪Next 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 reports🡪On 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.
The Other Reports Category in the Create New Report Page
🡺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.
Analyzing Data with Reports and Dashboards:
Select Positions🡪Click Create🡪Click Run Report.
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.
- Drag Location from the Field pane into the preview after Position Name.
- Click on Location, and select Bucket this Field
- Type Region in the Bucket Field Name.
- Click New Bucket, type country name, and press Enter.
- Select: cities Click Move To, and from its drop-down select country name
- Click New Bucket, type another country name, and press Enter.
- Add the related cities🡪Click OK.
Add Columns and Filters
🡺In report builder, drag the following fields into the preview.
- Hiring Manager
- Status
🡺You can also double-click fields to add them to the end of the report.
🡺Reorder columns by dragging them. When you‘re done, the order should be: Position Title, Location, Hiring Manager
Adding a Column Using Drag-and-Drop
🡺In the Show drop-down, select All Position🡪 Click Add 🡪Field Filter.
🡺Define a filter for Status equals New Position, Pending Approval, Open Approved🡪Click 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.
- Drag Location from the Field pane into the preview after Position Name.
Click on Location, and select Bucket this Field
🡺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.
- Drag Location from the Field pane into the preview after Position Name.
Click on Location, and select Bucket this Field
- Type Region in the Bucket Field Name.
- Click New Bucket, type country name, and press Enter.
- Select: cities Click Move To, and from its drop-down select country name
- Click New Bucket, type another country name, and press Enter.
- Add the related cities🡪Click OK. Add Columns and Filters
🡺In report builder, drag the following fields into the preview.
- Hiring Manager
- Status
🡺You can also double-click fields to add them to the end of the report.
🡺Reorder columns by dragging them. When you‘re done, the order should be: Position Title, Location, Hiring Manager
Adding a Column Using Drag-and-Drop
🡺In the Show drop-down, select All Position🡪 Click Add 🡪Field Filter.
🡺Define a filter for Status equals New Position, Pending Approval, Open Approved🡪Click 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 type🡪Click OK.
Summary Report Showing Open Positions by Region and Functional Area
Creating a Matrix Report
🡺To create the matrix report, we’ll use the report builder again, this time highlighting steps that are different from how we defined the summary report.
🡺In the Reports tab, click New Report. To count position records.
🡺From the list, click the ―+‖ to expand Other Reports🡪Select Positions, and click Create🡪From 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
Add Summary Fields:
🡺For our report, we need to include three different types of summaries: record count, average days open, and a formula that calculates the percentage of records requiring travel. While the first two are standard summary fields, the third will require a visit to the Custom Summary Formula editor. Let’s start with the first two. By default, the report already adds Record Count, so let’s add the average for the number of days a position stays open.
🡺 Find the Days Open field and drop it into the matrix.
🡺 In the Summarize dialog, select Average.
Now, let’s create that formula to calculate the percentage of records requiring travel. Double-click Add Formula. You’ll see the Custom Summary Formula editor.
The Custom Summary Formula Builder
🡺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 :
- In the Column Name field, enter Travel Required Percentage.
- In the Description field, enter The percentage of total position records that require travel.
- In the Format drop-down list, choose Percent.
- In the Decimal Places drop-down list, choose 0.
- For Where will this formula be displayed?, choose At all summary levels.
- Let’s write our formula. Similar to other formula editors in the platform, this provides tools to make make it easier.
- In the Formula section, click Summary Fields and select Travel Required and select Sum.
- The formula editor displays the following API representation of those values
Position c.Travel_Required c:SUM
- Click the Operators drop-down and select Divide🡪Click Summary Field and select Record Count. The final formula looks like this:
Position c.Travel_Required c:SUM / RowCount
- Click Check Syntax🡪Click OK.
Add Columns and Filters
Note: Before you can add fields to a matrix report, make sure Details is selected under the Show
drop-down list. If details aren’t shown, you can only add summary fields.
🡺Add the following report columns by double clicking them,Functional Area, Status, Position
Position: Position Title, Days Open and Travel Required should already be part of your report. For our report, we want to define three filters: one to include all positions, one to include only those positions created in the last year, and one to include those with a Status of Open – Approved or Closed Filled.
- In the Show drop-down list, choose All Positions.
- In the Date Field filter select Position: Created Date
🡺Notice that all other date fields defined on the Position object are also available in the Date Field filter, including Close Date, Hire By, and Open Date.
- For Range, choose Current and Previous CY (meaning this and last calendar year). The start and end dates are populated automatically.
- Add a field filter based on the status🡪Click Add🡪Create this filter.
- Status equals Open – Approved, Closed – Filled🡪Click
OK. Adding a Cross Filter:
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:
- Select Reports tab 🡪 click New Dashboard.
- Select Components tab 🡪 Drag & Drop one of the existing charts.
- Select Data sources tab 🡪 drag & drop down object from the (specified folder) on to the chart.
- Set the header & footer for the chart (optional).
- Save the dashboard by clicking save 🡪 provide valid title 🡪 save.
🡺It is mandatory to maintain the groups while preparing the charts.
🡺Max 3 charts can be created for 1 object.
Steps to add the Dashboard tab to application:
- Set up 🡪 type Apps in Quick find box 🡪 Apps.
- Select Edit beside Application for which tab is required.
- In Choose tabs select Dashboards and click Add 🡪 Save.
- By selecting Dashboards tab, user can view all the reports in chart format.
Note: Click Refresh whenever we want to refresh the chart. That means if any new modifications are there, it will be affected on chart.
Steps to enable Dashboard in Home tab:
- Set up 🡪 Customize under Build 🡪 Home 🡪 Home page lay outs.
- Click Edit option in Default page lay out 🡪 enable Dashboard snapshot option 🡪 Next.
- Arrange components in required order 🡪 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
Workflow Rules (using Process Builder):
🡺When you create a process in the Process Builder, you start by choosing an object, for example, a Position. Then you tell the Process Builder what to evaluate when someone creates or changes a Position record
🡺With the Process Builder, you can execute a wide range of actions,
- Email Alerts
- Field Updations
- Assign Tasks
- Outbound messages
Adding an Action That Sends Email Alerts
🡺Just as the platform includes built-in tools for writing emails to users and contacts in your organization
🡺Email templates allow you to create form emails that communicate a standard message, such as a welcome letter to new employees or an acknowledgement that a customer service request has been received.
🡺To personalize the content of an email template, we can use merge fields to incorporate values from records that are stored in the system. For example, if we wanted to address an email recipient by their first name, we could write an email template “Dear {!Contact.FirstName},”
🡺In this example, {!Contact.FirstName} is a merge field that brings in the first name of the contact to whom the email is addressed
🡺For our email alert, we can build an email template to notify users of new positions that have been added to the system. We can use merge fields to include information from the position record, such as its title and the required skills. Let’s go do that now, and then we can add the email alert action to our process.
Build an Email Template
🡺From Setup, enter Email Templates in the Quick Find box, then select Email Templates.
🡺Here you should see a list of all the email templates that have already been defined for your organization, including several sample templates from Salesforce🡪 Click New Template.
🡺We can choose to create a text, HTML, or custom email template. HTML and custom email templates are the same except that HTML templates allow you to specify a letterhead to give your email the same look and feel as other emails from the same source.
🡺To keep things simple, we’ll stick with a plain-text email for now🡪Select Text, and click Next.
🡺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 want🡪In 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
🡺Select an Email template
🡺In the Recipient Type Search field, choose Role and Subordinates.
🡺In the Available Recipients list, select Role and Subordinates: CEO and click Add🡪Skip the remaining fields and click Save.
Create a Process that Sends an Email
🡺Go to the Process Builder and create a new process.
🡺Enter New Position Notification for the process name. Press TAB to automatically enter the API name.
🡺For the process description, enter Notifies all employees that a new position is available.
🡺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 action🡪In the IMMEDIATE ACTIONS area, click Add Action. Select Email Alerts
🡺enter Action Name🡪For Email Alert,enter Email New Position Alert and select the Email New Postion Alert🡪Click 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 name🡪enter 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 Object🡪Select Position for the object type🡪Queue for the criteria name🡪Leave the Conditions are met selected🡪Set the Operator column to Does not equal🡪In the Type column, select String🡪In the Value column enter Recruiter🡪Click Add Row.
🡺In the Field column select Position > Created By ID > Role ID > Name.
🡺Set the Operator column to Does not equal🡪In the Type column, select String🡪In the Value column enter Recruiting Manager🡪Click Save.
Creating a Process That Assigns Tasks
🡺From Setup, enter Process Builder in the Quick Find box, then select Process Builder🡪Click New🡪Name 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 job🡪Click Save🡪Click Add Criteria.
🡺Enter Send Rejection Letter for the criteria name🡪For 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 object🡪Select Status and then click Choose🡪Leave the operator and type as Equals and Picklist🡪For the value, select Rejected🡪Click 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.
Immediate and Scheduled Actions
🡺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 Record🡪Enter Rejection Letter Task for the action name🡪Select 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 High🡪For 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 Choose🡪Let‘s also add a subject to our task.
🡺 Click Add Row🡪 Select Subject for the field🡪Leave the Type as String and enter Send Rejection Letter for the value.
Let’s add a due date for our task
🡺Click Add Row🡪Select Due Date Only for the field🡪Select Formula for the type🡪Enter [Job_Application c].CreatedDate + 1 and click Use this Formula🡪Click Save.
Create an Approval Process
🡺The approval process contains approval steps and actions that we’ll define later.
🡺From Setup, enter Approval Processes in the Quick Find box, then select Approval Processes.
🡺From the Manage Approval Processes For drop-down list, choose Position.
🡺There are two different wizards that we can use to create a new approval process
- Jump Start Wizard.
- Standard Setup Wizard.
🡺The Jump Start Wizard sets several default values for us and only requires input for the most crucial fields: the approval assignment email template, filter criteria to enter the approval process, and the designated approvers.
🡺The Standard Setup Wizard, on the other hand, allows us to configure every possible option for our approval process. We’ll stick with the latter for now so we can take a look at all of the options that are available.
🡺From the Create New Approval Process drop-down button, choose Use Standard Setup Wizard🡪In the Process Name field, enter Approve New Position.
🡺In the Description field, enter Ensure that a manager approves any position that his or her employee creates, and that any position with a minimum salary of more than $150,000 is approved by the CEO🡪Click Next.
🡺After entering the name and description, our next step is to specify the conditions that determine which positions need approval.
🡺In the first row of filter criteria, select Current User: Role not equal to CEO🡪Click Next.
🡺From the Next Automated Approver Determined By drop-down list, select Manager.
🡺The Manager field is a standard field on the User object that designates the user’s manager. The field establishes a hierarchical relationship between users, which prevents you from selecting a user that directly or indirectly reports to his or herself. This manager will be the designated approver for the first step of our approval process.
🡺Alternatively, you could have selected the Create New Hierarchical Relationship Field option in the drop-down list to define a new custom hierarchical relationship lookup field on the fly.
🡺The hierarchical relationship field type is specifically designed for the User object, and mimics the behavior of the standard Manager field by associating one user with another without indirectly associating that user to him or herself.
🡺For this approval process, though, the standard Manager field is perfect, so let’s move on.
Specifying the Approver Field
🡺Select the Use Approver Field of Position Owner checkbox.
🡺The Use Approver Field of Position Owner checkbox becomes editable when you select Manager in the Next Automated Approver Determined By drop-down list.
🡺When you select this checkbox, the approval request is routed to the user specified in the Manager field on the record owner’s user record.
🡺If you don’t select this checkbox, the approval request is routed to the manager of the user submitting the record. In our case, we want to obtain approval from the position owner’s manager, so select this checkbox
🡺In the Record Editability Properties area, choose Administrators ONLY can edit records during the approval process.
🡺Record editability allows you to specify whether a record that’s been submitted for approval can be edited by the approver before being approved. Since we don’t want managers to change the positions that a hiring manager or recruiter creates without alerting the owner, we’ll only let administrators perform edits while a record is in our approval process🡪Click Next.
🡺In the Approval Assignment Email Template lookup field, select Recruiting App: New Position Requires Approval🡪Click Next.
🡺Our next step in defining the approval process is specifying which fields should be displayed on the Approval page layout, which the approver sees when he or she approves or rejects a record.
🡺Each approval process has its own page layout, and, unlike other page layouts, the Approval page layout can only be configured from within its approval process
🡺Move the following fields from Available Fields to Selected Fields.
Position Title,Owner,Hiring Manager,Type,Location,Hire By,Job Description,Min Pay,Max Pay
Defining the Record Approval Page Layout