Salesforce AppBuilder Notes and Guide
Hi everyone, this is a comprehensive guide and notes for revising AppBuilder quickly. Admin and Developer should also know about App Building. So let's start.
What is cloud computing?
Cloud computing is the on-demand delivery of the computing resources like Platform for development , Software , Database servers etc...
Cloud computing says Instead of setting your infrastructure, let us take that infrastructure on rent.
There are three service models of computing :-
1. Saas (Software as a service) :- This service model will provide the software to be used directly..e.g. Gmail , Salesforce CRM software
2. Paas (Platform as a service) :- Paas is used by developers . Paas model provides the Platform on the cloud which can be used directly for development..
e.g. Force.com platform of Salesforce
3. Iaas (Infrastructure as a service) :-
Salesforce is not providing Iaas model..
What is CRM ?-
1. CRM stands for Customer Relationship Management Software..
2. CRM is a software which provides 360 degree view of customer and potential customer..
For Ex- Suppose this blog is my company then following will be:
1. Marketing :-
Digital Marketing or Campaigning in different colleges or schools
2. Sales :-
a) Leads :- Leads are the people who have shown interest to my product(blog) by any source of Lead . - 100 people
b) Opportunity :- Opportunity are the potential customers with whom my sales team has interacted with and has found genuinely interested for this course - 80 people
c) Contact :- Contact are the customers who have paid the fees and has enrolled .. 75 people
d) Account :- Lets say ABC company is coming to us and is saying that we have fired 50 people from the college , can you train on salesforce for us..
That company will be our Account . Account can be understood as the business vendor./Client..
3. Service :-
1. Case :- Case are the complaints or queries raised by the customer..
2. Solution :- are the solution provided for different cases..
2. Case Escalation :-
CRM is a software which manages every detail of the customer in all the processes whether it is Marketing or Sales and then Service..
Two types of CRMs are there :-
1.Cloud Based 2. On premises
Salesforce :-
1. Salesforce is a No. 1 Cloud based CRM software..
2. Salesforce is a American based company whose headquartered in California . This is a company which is providing cloud based solutions to other companies...
What makes Salesforce as the No. 1 CRM when we do have other CRMs also..
1. Cloud Based
2. Easy to customized (It can be used as it is or if we want it is easy to customize as per the business requirements )
3. Working on Multitenant architecture
4. Device friendly
5. Pay what u need model...
Lets understand the 4th point :- Salesforce has provided the different editions . These different editions have different features and have pricing . Now according to whatever what all features you need you can choose the appropriate edition..
- https://www.salesforce.com/editions-pricing/sales-cloud/
Check the pricing to get some information on the costing.
Other than all the discussed editions of salesforce , we do have one special edition which is known as Developer edition .. Which is free of cost and is there for learning purpose..
1. How to create a account on salesforce developer edition :-
Lets go to developer.salesforce.com - Sign Up
Username
Password
2. How to login to your salesforce account:-
go to- login.salesforce.com
Salesforce has provided two user interfaces to work on :-
1. Lightning User Interface :-
a) New UI
b) Recommended by salesforce
c) More interactive and it is device friendly..
2. Classic User Interface
a) Old UI
b) Not recommended by Salesforce
c) Not responsive , not device friendly
Salesforce has provided no. of predefined applications to work on such as sales application , service application etc and if we want we can also create our own application as per the business requirement...
To navigate to the application - Go to the app launcher(left hand side ) -
As we have already discussed about Leads , Opportunity , Contact and Account , Lets understand what they are known as in salesforce terminology :- They are known as Objects..
What is an Object in salesforce ?- Object of salesforce is equivalent to table of any relational database management system which is used to store the data . In salesforce , we do have two types of Objects :-
a) Standard Objects :- Standard objects are the predefined objects...
e.g. Lead , Contact , Account etc...
b) Custom Objects :- Custom objects are known as the user-defined objects..
What is Field :-
Fields are the attributes of an object , Fields are equivalent to column of the database table . We do have two types of fields:-
a. standard fields
b. custom fields.
What are records :- Record is the data stored in salesforce object . It is equivalent to row of the database table...
Lets say our Salesforce Guide company wants to store the details of the customers, employees ,courses offered in salesforce CRM. There are 5 users who will be accessing this salesforce CRM ... Now we will purchase 5 user licenses to access this salesforce CRM and manage our customer related staff.
1. Marketing Team wants to store the details of people who have shown interest to my course.. I will store that in the Lead..
In the sales application - Go to the Leads tab
Note :- There are multiple stages in the Lead such as :-
a) Open - Not Contacted
b) Working - Contacted
c) Converted - Not closed
d) Converted - closed
As soon as the status of the lead will be changed to Converted - closed , that means that lead has been closed successfully and the person has purchased my product and has become my customer . In that case , records of Opportunity , Contact and Account will gets created..
Note :- Here creating is optional .. Because it can depend the business requirements that Lead has already become customer than what is the need of creating record in Opportunity..
-------------------------------------------------------------------------------------
Suppose a company ABC has shown interest for the Corporate training program of the Salesforce Guide...
- Mr. X from the ABC has become the Lead for the Salesforce Guide ..If this lead has been converted successfully then three records of three different objects will be created which are as follows :-
1. One record of the Account object :- ABC will become Account (Client) For the Salesforce Guide..
2. One record of the Contact object :- Mr. X will become contact related to ABC Account.
3. One opportunity record also gets created which is optional..
-> One or more contacts can be related to a single Account .. e.g. ABC is one account and there many contacts (185) related to that particular Account.
-> Contact may or may not related to any account..
Set Up Personal Information :-
=========================
Go to the View Profile option at the top right hand side - Settings -
1. Personal Information section
2. Change My Password :-
3. Login History :- Will store the login history for last 6 Months..
4. Grant Account Login access :-
Lets say I am a sales person in Salesforce Guide . I m facing some issues in my salesforce org(account) then I want system administrator of Salesforce Guide or salesforce support team to logged in and see what is the issue . In that case I have provide access to my salesforce org from this option...
5. Reset My Security Token :- When you access Salesforce from an IP address that isn’t trusted for your company, and you use a desktop client or the API, you need a security token to log in. What’s a security token? It’s a case-sensitive alphanumeric code that’s tied to your password. Whenever your password is reset, your security token is also reset.
Salesforce Guide ABC :-
How to create a custom application :-
What is application/app :- An app is logical group of components like Objects and Tabs..
Set Up :- Quick Find Box - App MAnager -New Lightning App-
Salesforce Guide Saying It is very gud that u have created application but now we want to create something where we store the details about our Trainees.
In salesforce what is the thing which is used to store the data ?- Object
How to create a custom object ?-
From Set Up Page - Object Manager has a dropdown - from there select New Object
- As soon as we will create the object there are few standard fields which will be created automatically...as we know fields are like columns of the database table.
What are standard fields which will be created automatically for an object ?- How to check them ?=
From Set Up Page - Click on Object Manager - Quick Find - search for ur object - Go to Fields and Relationships and here u can see the list of all the fields...
CreatedById
LastModifiedById
OwnerId
Name
Field Label is something which is displayed on the User Interface whereas Field Name is something which is used to access the fields in the queries or in the programs...
- e.g. Field Label is the name of any person in school or in documents e.g. Divya is the Field Label which is in my documents..
Field Name is the API name which is in horoscope or Kundli of any person. e.g. Divyanshi is my API Name..
Lets learn how to create the fields :-
--------------------------------------
Set Up -Click On Object Manager - Quick Find - Search the Object - Fields and Relationship-- New- select the data type -Next -
Data Types of the fields covered till now :-
Auto Number
Text
Phone
Date
PickList (Multi-select)
Text Area Long
Picklist
Note :- Every Object and Every field has two things -
1. Label - Label is something which is displayed on the User Interface
2. Name :- Name is the API name which is something which is used to access the field or Object in the query or in the Programming code.. The API name of the custom fields and custom objects always consist of __c as the suffix .e.g.
For the trainee object the api name will be trainee__c whereas for the trainee NAme field the api name will be trainee_name__c
How to create Global Picklist value set :-
-----------------------------------------
1. Global picklist value set is the option which is coming when we are created the field of Picklist type.
Requirement :- In Salesforce Guide application we do need to create a picklist of City type in more than one object - We want it from Trainee object as well as for the Employee as well as for the Client object . Now what is happening for every object picklist field everytime I have to specify the values of city field again and again..
2. The solution to the above requirement is that you can create the data set for the cities only once and whenever we require you can use the same data set..
Set Up- Quick Find - Picklist Value Set -New - Provide the label and the values seperated by new line.. - Save
Note :- Global picklist value sets let you share the values across objects.
Now , Lets use this global picklist value set..
Q :- Creating Global Picklist value set means that we are not supposed to create picklist field for multiple object or data that mean we need to create the picklist but not required to specify the values again and again?
Ans :-
Field Dependencies :-
Field Dependencies is the concept where one field will be dependent on another field..
Lets say , we do have a requirement that for Trainee Object the city field should be dependent on the state selected . which means state should be the controlling field and City should be the dependent field.
Click on Object Manager - Quick Find - search Trainee object - Click on Trainee - Fields and Relationships - Field Dependencies - New - select the controlling field as state and dependent field as City -
Another requirement for Field dependenices :-
Suppose that in the trainee object we do have a checkbox named as Placement required and we do have one field named as Placement Charges of picklist type showing the values as 5000 or No Charges depending whether the placement required has been checked or not..
Here Placement required is the controlling field which is controlling the value of the field Placement Charges..
Lets create the above fields
Requirement :-
-------------
There is company named as SmartPharma company
manufactures specifically five pharmaceutical products:-
1. Hand Sanitizers
2. Gloves
3. Mask
4. PPE Kits
5. Immunity Booster Tablets
This company is coming to the ABC (New Candidates who are trained in creating objects , fields , records and so on) and is giving the following requirement :-
1. This company says to create an application named as Smart Pharma
2. Now , company is saying that we want to manage the details regarding :-
a) Pharma Products we manufactures
b) Hospital - want to manage the details of the hospital where the Field Rep of Smart pharma go and meet different physicians to sell their products .
c) Employees - want to manage the details about the employees of the company . There will be two types of Employee as of now - 1 .Field Rep 2. Field Manager
d) Visit :- Want to keep track of the visit done by different field reps to different hospitals.
e) Sample :- In visits done by field reps to different hospitals , they are giving some free samples to the hospitals which are cost for the company so the company want to keep track of those hospitals also.
f) Invoice :- company wants to track different orders raised by hospitals for the products..
There will be 1-2 questions of Field dependencies topic:-
1. Can a multi-select picklist be the controlling field..
Ans :- No ,a multi-select field cant be the controlling field whereas the multi-select picklist field can be the dependent field...
Relationship in Database Tables:-
1. What is the relationship between Employee and Department table?
1 Department can have many employees (1 to Many relationship )
Imp Point :- In case of 1 to Many relationship , we will be creating relationship field always on the many side..
Similarly in the salesforce we can implement one to Many relationship between the objects :- There are two ways of implement one to many relationship between the objects ?
1. Look Up Relationship
2. Master Detail Relationship
Look Up Relationship:-
1. Look Up relationship is a way to implement one to many relationship.
2. Look Up relationship always be created on the many side i.e. on the child object.. The object on the many side is known as Child object and the object on the one side is known as the parent object...
3. In Look Up relationship , child record can exist even without associating it any parent record...
e.g. Lets say I have two objects named as Project and Employee . 1 Project can have many employees so they do have relationship 1 to many relationship.Now i will creating Look Up relationship field on the many side i.e. on the Employees. I know that there can be some employees who are not assigned any project ...
Now lets create two objects named as Project and Employee and now lets make look up relationship between them...
Project Employee
Project Name Employee Code
Start Date Employee NAme
Now , lets create relationship field on the Employee object which is on Many side
Set Up- Object Manager -select ur Employee Object - fields and relationship - New - Look Up relationship- Next - select the object with which u want to make relationship i.e. Project - Next -
Master-Detail Relationship :-
---------------------------
1. Master detail relationship is one a way to implement one to many relationship.
2. Master detail relationship is a mandatory relationship which means every child needs to be associated with some parent record.. Child record cannot exist without associating it to the parent.
3. In case of MDR , Master is the parent object and Detail is the child object which is on the many side. Relationship field always be created on the Detail i.e. Child Object.
4. In case of MDR , If we will delete the parent record , related child records will automatically gets deleted.
5. In case of MDR , We can create roll Up summary field on the master object . Roll Up summary cant be created in case of Look Up relationship.
6. In case of MDR , Detail object will inherit the sharing and security settings of the parent object..
Now lets see there is a requirement that Every employee must be associated with some Project parent . So now we want to create MDR relationship between employee and Project so there are two ways :-
1. Delete the previous created Look Up relationship field and create a new relationship field of Master detail type
2. We can change the Look Up relationship field into Master detail relationship field.
Lets see how to change the Look Up relationship field into Master detail relationship field.
-------------------------------------------------------------------------------------
Set Up -Object Manager - Employee Object - Fields and Relationship= Go to the look up relationship field - edit - Change the field type - MAster detail relationship- Next -
Note :- You cannot create a new Master-Detail relationship on an existing custom object if records already exist. Then what is the solution?=
1 Solution is - delete the records from the object and then create a MDR.
2 solution is :-
a) Create the look up relationship between the objects
b) Relate every child record with some parent now u can create or change the field to MDR.
Few questions related to Look Up and MDR ?-
Q 1:- I have two objects named as Object A and Object B . I have created Master detail relationship between these objects , but when I am trying to convert that relationship into Look Up relationship that is giving me error.What can be the reason..
Ans - The reason can be the roll Up summary field. If Objects have roll Up summary field which is only supported in case of MDR , We cant convert it to Look Up relationship field.
Q 2:- I want to create Master detail relationship between two objects but I am getting the error? What can be the error.
Ans:- a) If objects already consist of records then we cannot create MDR , in that case we have to create Look Up relationship first , and then need to relate every child with some parent record and then we can convert it to MDR.
Q 3:- Can we create MDR between a Standard object and a custom object?
Ans :- Yes but Standard object cannot be on the detail side.. Standard object will always come on the Master side..
Differences b/w Look Up Relationship and MDR :-
Look Up MDR
1. not mandatory to relate every 1. mandatory to relate every
child with some parent record. child with one parent record.
2. Roll Up summary field cant 2. Roll Up summary field can
be created be created.
3. On deleting the parent record 3. On deleting the parent record
child records wont get deleted. related child records will get deleted.
4. In Look Up , child wont 4. In MDR , detail object
inherit the sharing and security will inherit the sharing and
settings of the parent object security settings of the Master
object.
5. Look Up relationship 5. IN MDR , standard object cant
can be created between standard be on the detail side.
as well as the custom object with
no restrictions
6. In an object , we can have maximum 6. In an object , we can have
40 Look Up relationship fields. maximum 2 MAster detail
relationship fields.
Total 40 relationship fields can be here , Max MDR can be 2 ,
so i can have
38 look up and 2 MDR
39 look up and 1 MDR
40 look up and 0 MDR
Allow reparenting:- Child records can be reparented to other parent records after they are created
In case of MDR , by default , we cant change the parent for any child record but if we want to have this option of changing the parent then we need to select one option - allow reparenting which came when we were creating the MDR field . so now edit the MDR field and select allow reparenting option..
Q :- Lets say I have two Objects Object A and Object B . I am able to edit the data on the Object A but not able to edit the data on the Object B , What do you think what type of relationship they have ? Is it look Up or is it MDR ..
Ans :- Look Up relationship.
Many to Many relationship :-
--------------------------
Lets say we want to make Many to many relationship between Project and Employee bcz as per our business requirement one project will be having many employees and 1 employee can be related to more than 1 project..
1. In RDBMS we used to create a third tables having foreign relating both the tables similarly in Salesforce , we will create an object here with two master detail relationship fields linking both the objects and that object is known as Junction object..
Q :- What is Junction Object?
Ans :- Junction Object is an object having two MDRs linking two objects to represent Many to many relationship.
Q :- We have discussed that In case of MDR , Detail object will share the security and sharing settings of the MAster object . Now , For the junction there are two master , which security and sharing setting junction object is going to inherit?
Ans :- Junction object is going to inherit the security and sharing setting of the primary Master object (the first object u have created relationship with)
Roll Up Summary field :-
1. Roll Up summary field always be created on the Master object in case of MDR..
2. A read-only field that displays 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.
Lets understand with an example:-
1. Lets say there is an requirement to count the total no. of employees for the particular project ..
Now lets go to Set - Object Manager - Project - Fields and Relationships -New- Roll Up summary field -
Home-work:- (delete the junction object)
----------------------------------------------
1.
Another requirement of roll Up summary field :-
Lets say we do have one to Many relationship between Project(Master) and Employee(Details) :-
1. Lets create a field of Currency type in Employee object to store the salary of the employee..
2. Now create a roll up summary field on the Project object to calculate the total amount spent on the Employees' s salary for the project
2. Now , in the Smart Pharma , create all the relationship fields (Look Up or MDR depending on your understanding) . For Invoicing I want you to create MAny to Many relationship bcz 1 invoice can be generated for multiple products and for 1 product there can be multiple invoices..
3. Also create the required roll Up summary field in Smart Pharma application..
Task for Self Practice to be Done :-
Task 1:- Complete the projects of the below link on Trailhead.
https://trailhead.salesforce.com/content/learn/projects/build-a-data-model-for-a-recruiting-app
https://trailhead.salesforce.com/content/learn/projects/customize-the-ui-for-a-recruiting-app
Task 2:- Practice Questions on Validation Rules
Q 1:- Write a validation rule to restrict the user from creating an opportunity if amount is less than 10000
Q 2:- Write a validation Rule on Contact to restrict the user from creating a Contact without specifying the email address.
Q 3:- Write a validation rule to check that if ownership is public then annual revenue must be populated and it should be greater than 0 (Account object)
Q 4 :- Validates that the Account Number is numeric if not blank. (Account object)
Q 5 :- Validates that the account Billing Zip/Postal Code is in 99999 or 999-99 format if Billing Country is USA or US.
Q 6 :- Validates that the Account Number is exactly seven digits if account number is not blank..
-- Use regex
AND
(
NOT(ISBLANK(ACCOUNTNUMBER)),
NOT( REGEX(AccountNumber, '[0-9]{7}') )
)
Q 7 :- Validates that the account Annual Revenue is not negative and does not exceed $10000.
Q 8 :- Create a custom field of Text type named as Other Reason on Case object . Now write a validation
to check Other Reason must contain a value if Case Reason (Predefined field) is having value as Other .
Q 9 :- If a case is already open, prevents the Status from being changed back to “New.”
And(
NOT(ISNEW()) ,
NOT(ISPICKVAL( PRIORVALUE( Status ) , 'New')),
ISPICKVAL(Status , 'New')
)
Q 10:-
Write a validation rule to check that website must end .com , .org , .in , .net
on Account object.
AND(
RIGHT( Website , 4) <> '.com' ,
RIGHT( Website , 4) <> '.org' ,
RIGHT( Website , 4) <> '.net' ,
RIGHT( Website , 3) <> '.in'
)
Task 3:- Practice Questions on formula fields
Q 1:- reate a formula field named as commission rate on the opportunity object whose value is based on deal size , returning a 9%(0.09) as the commission rate for opportunities over 10000 of amount and an 0.08(8%) commission rate for smaller deals..
Q 2:- Create a formula field named as commission amount for any opportunity that has a closed Won stage ..The value of this formula field will be the amount multipled by 0.02 if stage Name is equal to Closed won otherwise commission amount will be 0.
Q 3:- Create a formula field named as Case Categorization to display a text value of RED or GREEN , depending on a case age (a custom field of number type)
If Case age is greater than 20 , Display Red,
Otherwise display GREEN.
On Case object (standard object)
Hint:- Use IF function..
Q 4:- Create a formula field named as Lead score , providing a higher score for phone calls than Web requests . If lead source is phone provide 2 as the lead score, if source is web provide 1 as the lead source otherwise provide 0. (Lead object)
Q 5 :- Create a formula field named as Full name on Contact object in which u need to concatenate the first name and last name of the contact.
Q 6:- Create a formula field named as Total number of characters on Contact object which will calculate the total no. of characters in Full Name field which is created in Q 3
Formula Field :-
1. Formula Field is a read only field whose values will be derived through
built in formula..
Q 1:- Create a formula field named as commission on the
Opportunity object whose value is based on deal size , returning a
9% commission if amount is greater than 10000 of amount
and 8% of discount for smaller deals..
Set Up - Object Manager - Select our Object i.e. Opportunity - Fields and Relationships -New Field- select Formula as the Data type -
IF( Amount >10000, 0.09, 0.08) (HEre return type is Percent)
Q 2 :- Create a formula field named as commission amount for any opportunity that has a Closed Won Stage . The value of formula field will be the amount multiplied by 0.02.
IF( ISPICKVAL( StageName , 'Closed Won') , Amount *0.02, null)
Here , ispickVal is used to compare the value of Picklist field , if stage Name is equal to Closed Won , the formula will return Amount*0.02 otherwise if stage is not closed WOn will return null.
Q 3:- Create a custom field named as Contract Expire Month on Employee object in which we need to find the month in which contract will get expired . The total no of months for which contract is valid is 6 Months..
MONTH( DATEVALUE(ADDMONTHS( CreatedDate ,6) ))
1. ADDMONTHS( CreatedDate ,6) - 6 months will be added to the record creation date..
2. DATEVALUE(ADDMONTHS( CreatedDate ,6) ) - will extract the date from the DateTime value returned by AddMonths function
3. MONTH( DATEVALUE(ADDMONTHS( CreatedDate ,6) )) - Will fetch the month of the given time in number i.e. 1 for January , 2 for Feb and so on..
4:- CASE(
MONTH( DATEVALUE(ADDMONTHS( CreatedDate ,6) )), 1, 'January', 2, 'February',3,'March',4,'April',5,'May',6,'June',7,'July',8,'August',9,'September',10,'October',11,'November',12,'December','Not Correct')
Q 4 :- Create a formula field named as Payment Due Indicator to return the date after 5 days after the contract start date whenever Payment due Date is Field is blank .Payment Due date is a custom field of Date type..
1. Create a custom field named as Payment due Date of date type on Contract object.
2. Now , create a formula field as Payment due Indicator
IF( ISBLANK( Payment_Due_Date__c ) , StartDate +5, null)
Q 5:- Create a formula field on the Hospital object named as Google search that makes the company website as the hyperlink...
HYPERLINK( Website__c ,'Click Here..')
Q 6 :- One more example of Hyperlink
HYPERLINK('https://www.google.com/search?en&q='+ Name , 'Click Here')
Q 7 :- Create a formula field named as Employee Profile Picture where u need to display the Profile Picture of the Employee..
Step 1:- Upload the Image into the static resources
1. Set Up -Quick Find - Static Resource -NEw - provide name and Image - and click on Save - click on View file..
2. Object Manager - Employee = fields and relationship- NEw- field- Formula-
IMAGE('https://c.ap16.visual.force.com/resource/1600662582000/ProfilePic1', 'Nor Available',200,200)
As of now , image will be same for all the employees .. To show different image for different employee
1. Upload the Different images in static resources.
2. Create a field of Text type named as Image URL there u will need to add URL for every image for every employees
3. Now in the Image function , In the URL , we need to select the field created in step no. 2
Validation Rules :-
--------------------
1. Validation rules is the concept which will restrict to add the invalid data into your salesforce org..
2. If the rule given in validation rule is correct then will display the error msg , if rule is incorrect will allow you to insert or to update..
Q 1:- Write a validation rule to restrict the user from creating an opportunity if amount is less than 10000
Set Up - Object MAnager - Opportunity - Validation Rules - New
Q 2:- Write a validation rule to check if ownership is public then annual revenue must be populated and it should be greater than 0 on the Account object
IF( ISPICKVAL( Ownership ,'Public') , ISBLANK(AnnualRevenue ) || AnnualRevenue <0 , false)
explanation :- Here , If ownership is public and annualrevenue is blank or if it is less than 0 then the rule will return true , which will give the validation error.
If ownership is not public then I dont want to check anything , will return false which will show any error.
2 way :-
AND(
ISPICKVAL( Ownership , 'Public'),
OR(ISBLANK(AnnualRevenue ), AnnualRevenue<0)
)
Here , in the first condition we are checking that if ownership is Public and if anyone of the given condition is true which means annual revenue is blank or if annual revenue is less than 0 then give the validation error.
Q 3:- Write a validation rule to check that Contact Number of Employee is a 10 digit number..
NOT( REGEX( Contact_Number__c ,'[6789][0-9]{9}') )
Q 4 :- Write a validation rule to check that hospital website must end with .com , .in , .net , .org
AND(
RIGHT( Website__c , 4)<> '.com',
RIGHT( Website__c , 4)<> '.org',
RIGHT( Website__c , 4)<> '.net',
RIGHT( Website__c , 3)<> '.in'
)
Page Layouts :-
1. Page layout is used to control the appearance of the Record detail page.
2. Through Page layout we can control which field will be mandatory or not.
3. Through Page Layout I can make any field read only.
4. IF there is any field that we dont want to show to the user we can delete from the page layout..
Lets edit the Page Layout of the Employee object :-
Object Manager - select the object -Page Layouts- Here u can either edit the existing page layout or u can create a new page layout..
In the page layout u have seen number of standard buttons which you can add on the record detail page , but if you want you can also create ur custom buttons and links and can add them on the record detail page...
Object Manager - select the object -Buttons, Links, and Actions- New Button or Link -
New Button
After creating the button we need to add this button in the page layout only then it will be visible..
Data Security :-
Data Security is the concept of controlling which users can view,edit or delete any record or field in the salesforce application. Here with this concept we can control access to the whole org , a specific object , a specific field or an even individual which means data security can be implemented on four levels :-
1. Orgnaization Level Security
2. Object Level Security
3. Field Level Security
4. Record Level Security
I. Orgnaization Level Security:- In the organization level security , you can maintain a list of authorized users , set password policies and limit login to certain hours and locations..
a) Maintaining User :- Every salesforce user is identified by a username , a password and a single profile . Together with other settings , the profile determines what functionality the user can perform , what data user can see and what they can do with that data.
How to create users :-
Set Up- Quick Find - Users - New User
Before creating the user , we need to profile bcz it is mandatory to assign profile to a user.:-
Set Up - Quick Find - Profile - Now When I will click on Profile- There will number of standard profiles which are available- But you need to create your custom profile - New Profile - Select standard platform User as the existing profile - Give name to ur profile - Click Save - I have created two profiles - One FIeld Representative and another Field Manager
Now , you should be able to understand what is License :- License as the name suggest it is the license to logged-in in the salesforce org . Profile will always be dependent on the License . In developer edition of salesforce , we have 2 salesforce license and 3 salesforce platform license..
salesforce license :- Is the full license which means any user with the salesforce license have access to all the standard objects and fields and provided custom objects and fields.
Salesforce platform :- Wont be having access to all the standard functionality...
Lets create users :-
User 1:- Field Rep(Shyam)
d.garg@almalearn.com
Password :- divya@12
User 2:- krishnaABC@SalesforceGuide.com
User 3 :- ramABC@SalesforceGuide.com
Freezing a user and deactivating a user(Imp) :-
Once we will freeze any user or deactivate any user , that user wont be able to login to the salesforce org , Once we have freeze a user , that user wont release his license . He will be temporarily freezed. But if we will deactivate any user ,he will release his license , and that license can be assigned to any other user.
Note :- Check the available license from the Quick Find - Company Information..
b) Set Password Policies :- You can configure several settings to ensure that your user's passwords are strong and secure.
Quick Find - Password policies
c) Whitelisted Trusted IP ranges for the Org :- The first time you log into the salesforce , the IP address is cached in your browser , Anytime you log in from a different IP address or browser you will be asked to verify your identity . You can bypass this step for trusted IP ranges .
Set Up - Network Access - New - range the IP address to which u trust . Now if you will try to login your salesforce org from any of the mentioned IP Address then you will not be asked for the verification code.
If you have an IP Address outside the IP Address range , you are not excluded for logging in . You simply have to verify your identity by entering the verification code..
d) Restrict Login Access By IP Addresses Using profiles:-Lets say we want that our Field Reps should be able to login from the office primses only . They should not be allowed to login from the IP Address which is not of office.
Set Up - Quick - Profiles- select our profile i.e. Field Representative - Login IP Ranges- NEw -
In the profile , we can control the login access by time also - suppose we want that our field rep should be able to access the salesforce org between 9 to 5 only..
Set Up - Quick - Profiles- select our profile i.e. Field Representative -Login Hours
Object Level Security :- In Object Level security we can control which users can access the object and what are the different operations which can be performed on the object . Object level security can be done in two ways :-
1. By Profiles
2. By Permission Set
What is Profile :- A profile is a collection of settings and permissions. Profile setting determine which data the user can see , and the operation user can do with that data . The settings in a user profile determine whether the user can see a particular app , tab , Object , field or record type.
The permission of profile determine whether the user can create or edit or delete the record , run reports and customize the application..
Note :- A profile can be assigned to many users but a user can have only one profile..
The salesforce has provided number of standard profiles such as:-
A) read only
b) Standard User
c) Standard Platform User
d) MArketing USer profile etc..
Every standard profile is associated with some license and is providing the standard settings and permissions. Standard profile cant be modified so if we want to provide settings and permissions as per our requirement we always have to create custom profile and there we can provide different permissions as per our requirements .
There are number of things a profile can control:-
1. Object Permission
2. Field Permission
3. User
4. Tab Settings
5. App Settings
6. Apex class
7. Visualforce pages
8. Login IP Ranges and Time
9. Record Types
10. Page Layouts
etc..
example :-
1. Now , we do have a scenario where we want to provide permission for Smart Pharma application to our Field Representative and Field Managers :-
Go to their profile and provide permission on the application
2. Now we need permissions on different objects to the profiles.
Go to their profile and provide permission on the application
Answer to Abhay's Question:-
Q :- Cant we give all these permission to a particular user rather than Profiles?
Ans :- If we have 2 users with the same profile , Then through profile we will give those permissions which will be required for all the users of that profile..Now to give extra permissions we will use permission set.
Note :- Through profile we will be providing the minimum level of permissions required for all the users of that profile . and if we want to provide extra permission of one or more user than we can provide them by using the permission set.
Note 2:- Permissions given through profiles cant be restricted or minimized , we can only extend the permissions using permission set
Permission Set :- Permission set makes it easy to grant access to various tabs and custom objects in your org and we can remove that remove extra access when it is not required. Users can only one profile but they can have multiple permission sets .
Requirement :- We have created two users Shyam and Krishna both with the Field Representative profile . Where if I talk about Hospital object I have provided the permission of Create and read only.. Now lets becase Krishna is a senior Rep , to him I want to provide the extra permission of edit on Hospital object..
Set Up -Quick Find - Permission set - New - Provide the Label and click on Save - Object settings - Hospitals - Edit- Save - Manage Assignments - Add Assignment - Select Krishna -Assign
Field Level Security :-
In some cases , you want that users should be having access to an object , but you want to restrict the access of a particular field of an object that can be done by Field Level security . Field level security controls whether a user can see , edit and delete the value for a particular field on an object .Field Level security is also implemented by two ways :-
1. Profile
2. Permission Set
e.g. Lets say we want all the field representative should be able to see the Pharma Product object but they shouldnt be able to see the Product Specification field .
Go to the Profile - CLick on Field Representative Profile - select Pharma Product object under Custom Field-Level Security - Click on View Link - Edit - Unchecked the Read and edit access for Product Specification..
e.g. 2. Now there is a requirement that user Krisha should be able to Product specification field..
Go to the permission set - New - Provide the label - click on Save- Object settings - Pharma PRoduct - Under Field Permissions - Provide the read access- Click on Save - Manage assignment -add assignment- select the krishna user and click on assign
4. Record Level security :- Record level security determines which individual records users can see and edit in each object they have access to in their profile..Access to records can be done in four ways:-
i) OWD (Organization wide default)
ii) Role hierarchy
iii) Sharing rules
iv) Manual Sharing
Lets understand with the scenario:-
A) Tell me that do you want to show the details of other employee to an employee.
Answer is No. which means you want to set the record level access for the users of the salesforce org and that can be done by setting OWD.
Quick Find - Sharing settings - In Organization wide default section - click on edit - select ur object i.e. Employee - select private as OWD and click on Save..
Selecting OWD as private means only record owners can see the record. Other users cant see the records..
OWD Can be set as :-
a) private :- Only the record owners can see the record
b) public read only :- All the users who have access on the object can see the record but cant edit them
c) public read/write :- all the users having the permission of object can see all the records and can edit them
B) There is a requirement that record of Employee created by field representative should be visible to their Managers. and this is the concept which can implemented by Role hierarchy..
Set Up - quick find - roles - Click on set up roles- Click on add role- PRovide the label as Field Manager role and This role reports to CEO - click on Assign Users to role- assign Ram to this role - now again to roles - create a role named as Field Rep Role which will report to Manager role
Now go to Quick Find - and search for sharing settings - go to ur object employee- and check if Grant Access Using Hierarchies is checked , if not check it.. now any record created by rep will be visible to the Manager ..
----------------------
Tomorrow agenda
iii) Sharing rules
iv) Manual Sharing
v) Record Type
vi) Workflow
vii) Process builder
ICICI Bank :-
Manager
Clerk
Two profiles -One for Manager and One for Clerk.
Q 1:- Who should be access that ICICI Bank Application?
Ans :- Only the authenticated users with correct ID and Password
should be able to login to the salesforce org to access Bank
application . Password should be strong so no one crack it .
If it is a banking application which application will only
accessible inside the bank premises and within the banking hours
--- Organization Level Security
Q 2 : -Now the Question is How will be control which objects will
be accessible by my different users and what are the different operations user can perform on the data?
Ans :- Object Level security which is implemented through Profiles and PErmission set.
Here I can specify Clerk can access the Customer details object and cant edit and delete them whereas MAnager is having full access of customer details object .
Q 3 :- Now there is a requirement that users with the clerk profile should be able to access the Bank account object but they should not be able to see Contact Number field of Customer.
Ans :- This is implemented by field Level security which is done by profiles and permission sets.
Q 4:- Now , Clerk Users can access the object named as Customer but I want that Customer details entered by the one clerk user should be only accessible by its owner only..
Ans :- This is implemented by OWD . OWD we keep as private here. which means all the users who have the permission of the Customer object can only access the records created by them.
Q 5 :- Now there is a requirement Customer object records created by one clerk user should not be visible to another clerk user but records entered by the clerk users should be visible to their manager
Ans :- This is something we have implemented by Role Hierarchy..
Sharing Rules :-
1. Sharing rules are used to open up the access for the records.
2. Sharing rules provides automatic exceptions to the OWD which means OWD is provided the minimum level for the records , Role Hierarchy opens up the record for the Manager and sharing rules will share the records according to the some conditions...
There are two types of sharing rules:-
a) Criteria Based sharing Rule
b) Owner BAsed sharing rule
Requirement :- There is an requirement that employee records where Employee is contractual should be shared with all the Field Reps..
Go to set up - Quick Find - sharing settings-scroll it down - under sharing rules section - search for ur object - New -
In the sharing rule , U have to specify :-
1. which records u want to share
2. with whom u want to share
3. what is the permission that u want to give...
Manual Sharing :-
1. It is used to manually one record with another user.
2. This is only available in salesforce classic UI as of now.
Note :- IF sharing button is not visible you need to go to Page Layout of your object and from there u need to add the sharing button..
---------------------------------------------------------------------------------------
Workflow :-
Workflow lets you automate manual procedures and processes to save time across your org.
Workflow can be broken into two main component:-
a) Criteria :- The condition
b) Action :- What to do when records meet the criteria
e.g. If it's raining , then I will have Tea and Pakodas.
Criteria :- If it's raining
If condition is true which means if it is raining then what is the action I want to perform :- I want to have TEa and Pakodas
Criteria in workflow again can be classified into two types:-
1. Evaluation Critera :- decides when to evaluate this workflow.
2. Rule criteria :- is the business criteria..
Actions are further classified into two types :-
1. Immediate Action
2. Time Dependent Action
What are the different actions which can be done either immediately or after time:-
1. Task _ assign the task
2. Send email -
3. Field Update
4. Send the outbound message
Q 1:- When a new opportunitu is created and the amount of the opportunity is greater than 10000 then want to send an email to the Manager.
Ans :- Here , if we want to send the email ,first of all we should create an email template..
Quick Find - Email Template - Classic Email Template - New Template - Select Text as the email template -
Note :- Lightning Email TEmplates are not supported in automation tools like workflows and process builders..
Now , lets create a workflow
Quick Find - workflow Rules- NEw Rule - select the object -
Note :- dont forget to activate your workflow..
Q 2:- When a new employee record is created then we want to send a welcome email to him .
Solution 1. Lets first create the email template and then the workflow..
1. We want to create email template HTML(With letter head)
2. So first switch to salesforce classic and in document folders you need to add the logo for the letterhead-click on + sign - find documents- New-
3. Now again to lightning UI and start creating the letter head by selecting classic letterhead from the Quick find option..
4. Now create the email template
5. Now lets create the Workflow rule
Q 3:- Lets edit the workflow created in step no- 1 , and add the action of creating a follow Up Task as well as Update the Priority field of Opportunity to High..
As of now , we have seen the evaluation criteria as created and we have seen immediate actions like Task , Field Update and send email through workflow..We will cover the 4th action Outbound Message.
Imp. point :- Workflow can only update the field for the same object on which workflow has been created or it can update the field of the Parent object record if parent and child are related to each other through Master detail relationship..
In workflow we have three types of evaluation criteria:-
1. created - evaluate the workflow rule criteria only when record gets created.
2. created and everytime its edited :- evaluate the rule criteria each time a record is created or updated . If the rule criteria is met ,
then run the action.. If u have choose this workflow , u cant create time based action
3. created and everytime its edited to subsequently meets the criteria:-
a) When a new record is created , run the workflow if rule criteria is getting is satisfied.
b) When a record is updated , run the workflow only if the record is meeting from not meeting the rule criteria to meeting the rule criteria..
If opp is greater than 10000 then wants to send an email..we have choose 3 as the evaluation criteria
1. I created opportunity and amount is 10000 then email willnt be triggered .
2. If I update the opportunity and will make amount as 20000 then email will be triggered.
3. If I update the opportunity amount as 25000 then email will not be triggered.
4. Again I update the opportunity amount as 20000 then email not be triggered.
5. Again I update the opportunity amount as 5000 then email not be triggered.
6. Again I update the opportunity amount as 15000 then email be triggered.
Q 4:- Lets edit the workflow to change the evaluation criteria as the 3rd criteria and also add a email after 2 days of the Opportunity creation..
Ans :-
Note :- It is recommended to have single workflow per object . Bcz we cant control the order of the workflow to be executed..
Process Builder:-
----------------
Process Builder lets u automate business processes and gives you a graphical representation as you build it..In addition to everything a workflow can do , you can peform number of extra actions. Some of them are as follows:-
a) Create a record
b) Update a record
c) Email Alert
d) Post to chatter
e) Launch Flow
f) Approval Process
g) Quick Action
h) Invoke another process
i) Call the Apex code.
Components of Process Builder :-
1. Trigger = specifies when the process builder will start
2. Criteria -rule criteria
3. action:-
a) Immediate
b) Time BAsed
Now , lets deactivate the workflow created above for the Opportunity and performs the same task using Process Builder.
Q :- Object :- Opportunity
Condition :- Amount is > = 10000
Action:- 1. send email
2. Create a new contract record
3. Upate Type as New Customer
4. Post to chatter
Quick FInd - Process Builder - New -
Lets discuss the differences between Workflow and Process Builder
------------------------------------------------------------------
Workflow Process Builder
1. Only 4 actions are supported 1. Number of actions can be performed
2. workflow can only update the 2. Process builder can update the field
field of the parent record and too of child as well irrespective of the
if parent and child has MDR or of the relationship type
same object .
3. We cant control the order of 3.The order of Process builder can be
execution if there are more than controlled
one workflow on an object
4. Send outbound messages 4. Process builder cant send the outbound msgs .
Workflow
Process Builder
Email templates - Text and HTML With letterhead
Letterhead..
Approval Process :-
----------------
e.g. Leave Approval Process
1. Lets create one object named as LeaveRequest with the fields
leaveType picklist
startDate date
endDate date
Reason For LEave Text Area
Approval Status (picklist) - New , Submitted for Approval , Approved , Rejected , Recalled.
2. Whenever any user create a Leave Request , he can submit it to his Manager for Approval. so lets create one approval process for the same.
Quick Find - Approval Process- select the object for which we want to create approval process- Create New Approval PRocess- Standard Wizard -
In step 1:provide the label
step 2:- Nothing just click on Next
Step 3:- Nothing just click on Next
Step 4:- Nothing just click on Next
step 5 :- Select the field u want to show to the approver
Step 6:- Nothing just click on Next - click on Save - from the next screen select the last option- Now click on the name of your approval process -
In Initial Submissition action -select the add new - add field update - specify the approval status to be updated with submitted for approval value.
similarly add the actions for approval and rejection//
Now go to the approval steps -New approval step -
As soon as ur Field Rep will make any Leave Request , he need to submit it for approval manually . And If submit for Approval button is not there u can add it from the page layout.
Now , we want that as soon as a leave request gets created , it should be submitted for approval automatically :-
For this we need to create a process builder which will called as soon as a leave request will gets created and from that process builder u need to submit it for approval.
To recall the leave request - select the checkbox from step no 6 of approval process - Allow submitters to recall approval requests
Note:- Once you have submitted ur record for approval that will be locked and cant be edited , if you want to make any changes then you need to recall the record from the related list of record and then only u can edit it and again submit it for approval.
Answer to Asha Patil Question:-
------------------------------
How we can submit leave to immidiate manager(L1) by default without specifying manger name in the approval process?
1. In step 3 select
Next Automated Approver Determined By Manager and click on Save
2. Now go to the approval steps - edit - In step no 3
Automatically assign using the user field selected earlier. (Manager)
3. Now assign the Manager for ur user (Field Rep user - KRishna)
Go to Quick Find - Users - Krishna User - Edit - specify the manager for the krishna USer , now if krishna will make a leave request that will go to his Manager ..
---------------------------------------------------------------------------------
Data Loader :-
Data Loader is a desktop application which helps you to import or export data outside the salesforce org..
Set Up - Quick Find - Data Loader
In Data Loader you have to specify your password with the security token..
upsert :- upsert is the combination of update and Insert . If record id is there , record will get updated , if record Id is not there , the record will gets inserted..
In case of upsert , U have two ways to compare the existing records one is the record Id and another is the external Id.. So Lets create an external Id for the Lead object . external Id is the id which is used to compare the salesforce record outside the org..
Home-work:- (I have questions in the exam ):-
1. What is external Id ? you need to tell me what type of field can be created as the external ID?
2. What is the different Data Import Export Wizard and data Loader?
3. For how many my records will be there in the recycle bin?
4. What are objects supported by Data Import Wizard?
5. How much data can be imported or exported by Wizard and Data Loader?
Record Types :- There are two main uses of Record Types:-
1. To control the value of picklist field.
2. To display different page layouts to a single profile..
Use case of Record Type :- 1. To control the value of picklist field.
----------------------------------------------------------------------
Lets say we have an object named as Pizza which is having fields named as Pizza Name , Quantity , Price , Pizza Type .
Now we want to allow the user to control the value of Pizza Type field by creating two record types for Pizza Object..
Object Manager - Pizza - Record Types
Use case of Record Type :- 2. To control the value of picklist field.
----------------------------------------------------------------------
Now , we want to extend the functionality done in Use Case 1 , here we want to different page layout for Veg record type and non-veg record type ..
Reports and Dashboard :-
----------------------
Before creating the reports , we need to understand what is the report type..
1. Report type is a like a template which gives the ability to create the reports type in different format.
2. Salesforce provide a set of predefined standard report types.
3. IF we want we create custom report types as per our requirements . Lets say I want to provide all the fields of an object in the template or I want to provide different field labels then we will go for custom report types.
4. For a custom object , once u will select allow reports checkbox , then a report type will be created automatically other report type will not be created you have to create custom report type .
What is a report ?
-1 . Report is a list of records that meets the certain criteria specified by you . It is defined in salesforce in the rows and columns and can be filtered , grouped or can be displayed in graphical chart..
There are four types of reports :-
1. Tabular :- It is a simple report having the data in rows and columns (Chart cant be created)
2. Summary report :- Here , in this report we will do grouping on the basis of rows
3. Matrix report :- Perform two level of groups . columns wise and row wise
4. Joined report := Uses more than one report type.
Lets start and create a simple report :-
Go to the reports tab- New Report - Choose Report Type - Opportunities -
Joined report :- As of now we have discussed three types of reports- Tabular , Summary and Matrix . But in all these reports we can only choose single report type whereas Joined reports are the special one which allows us to choose multiple report types..
e.g. Want to display Accounts , Account with Opportunities, Account with Cases..
Lets see What is a Bucket field :-
Bucket field is something which can be used to categorise the records..
Reports - New Report -Choose Report as Opportunities - select the fields.
If we want we can create formula field in our report..
Now , lets create a report for the Leaverequest object :-
Go to set Up- Object Manager - LeaveRequest - Allow Report
Lets create the custom report type :-
----------------------------------
Set Up- Quick Find - report types -
Export the report - Go to the reports tab- from the drop down option -click on export
subscribe the report:-
How to control the access of the reports and dashboard:-
1. To provide the access to the individual user or groups of users we can share a report or dashboard folder not the individual reports / dashboard
Create a dashboard :- Dashboard is a collection of reports , VF pages and other components..
Architecture of Salesforce :-
1. Salesforce works on Multitenant architecture..Multitenant means that resources will be shared by different organizations as per their demand..
e.g. Society building where number of families are residing in their dedicated space . Although the families are having the dedicated space but still there few things they are sharing e.g. Community Hall , Park , Gym etc..
Now , if the organization are sharing the resources so there must be some limitations , It should not be the case that organization is using all the resources and other organization are starving for the resources thats why salesforce has put some restrictions and these restrictions are known as Governor limits. In salesforce , a developer has to work under these limits only..
e.g. What is the total no. of relationship fields I can have on an objects?
Ans - 40 , out of 40 max 2 can be the MDR and rest 38 can be look up or all 40 can be lookup.
e.g. 2:- What is the total no. of workflow we can create for an object?
Ans :- 50 , out of 500 there can be only 50 active workflow rules
Workflow Rules
Lightning Flow (Visual flow)
These topics will be added soon. Otherwise you have reached the end of the notes.
Did you like our efforts? Do mail us to at guide2salesforce@gmail.com
Comments
Post a Comment