Object Relationships in Salesforce
Object Relationships in Salesforce
4 Replies
Object Relationships in Salesforce
A relationship is a bi-directional association between two objects. Relationships allows us
to create links between one object and another. The platform supports following
relationship types
Master-Detail
ookup
Many-to-Many
Master-Detail (1:n)
A parent-child relationship in which the master object controls certain beha!iors of the
detail object.
"hen a record of the master object is deleted# its related detail records are also
deleted.
The $wner field on the detail object is not a!ailable and is automatically set to the
owner of its associated master record. %ustom objects on the detail side of a
master-detail relationship cannot ha!e sharing rules# manual sharing# or &ueues# as
these re&uire the $wner field.
The detail record inherits the sharing and security settings of its master record.
The master-detail relationship field is re&uired on the page layout of the detail
record.
'y default# records can(t be reparented in master-detail relationships.
Administrators can# howe!er# allow child records in master-detail relationships on
custom objects to be reparented to different parent records by selecting the Allow
reparenting option in the master-detail relationship definition.
)ou can define master-detail relationships between custom objects or between a custom
object and a standard object. *owe!er# the standard object cannot be on the detail side
of a relationship with a custom object. +n addition# you cannot create a master-detail
relationship in which the User or ead objects are the master.
oo!up Relationship (1:n)
This type of relationship links two objects together# but has no effect on deletion or
security. ,nlike master-detail fields# lookup fields are not automatically re&uired. "hen
you define a lookup relationship# data from one object can appear as a custom related list
on page layouts for the other object. -ee the -alesforce online help for details.
.. %hild row not automatically deleted when a parent row is deleted
/. 0o inherited sharing.
1. /2 lookup relation relationships allowed per object.
4. ookup field on child not necessarily re&uired.
Man"-to-Man"
)ou can use master-detail relationships to model many-to-many relationships between
any two objects. A many-to-many relationship allows each record of one object to be
linked to multiple records from another object and !ice !ersa.
To create a many-to-many relationship# simply create a custom junction object with two
master-detail relationship fields# each linking to the objects you want to relate.
#nter$iew %uestions about object relationships in Salesforce:
&ow man" relationships included in S'D( ) *hat are the"+
"e are ha!ing three types of relationships# they are
ookup Relationship
Master-Detail Relationship
Many-to-Many relationship
*hat is a ,oo!up Relationship-+
,p to /2 allowed for object
3arent is not a re&uired field.
0o impact on a security and access.
0o impact on deletion.
%an be multiple layers deep.
ookup field is not re&uired.
*hat is ,Master-Detail Relationship-+
Master Detail relationship is the 3arent child relationship. +n which Master represents
3arent and detail represents %hild. +f 3arent is deleted then %hild also gets deleted.
Rollup summar" fields can only be created on Master records which will calculate the
-,M# A45# M+0 of the %hild records.
,p to / allowed to object.
3arent field on child is re&uired.
Access to parent determines access to children.
Deleting parent automatically deletes child.
A child of one master detail relationship cannot be the parent of another.
ookup field on page layout is re&uired.
Does an object can ha$e both relationships (oo!up Relationship ) Master Detail
Relationship) at a time+
)es# single object can ha!e both relationships at a time.
*hat is a ,Self Relationship-+
A self Relationship is a lookup relationship to the same object.
-uppose let(s take an object 6Merchandise7. *ere we can create relationship in between
the Merchandise to Merchandise 8same object9 object. That is called 6-elf Relationship7.
*hat is ,Man" to Man" Relationships-+
Allow for the relationship of two objects in a many-to-many fashion.
&ow we achie$e the ,Man"-to-Man" Relationship-+
'y using :unction $bject we can achie!e this relationship# here junction object is ha!ing
Master- Detail Relationship with different objects 8;<.-tudents = %ourses9. ,sing this
Master to Detail Relationship# we can create the Many-to-Many Relationship in between
the objects.
*hat are the main thin.s need to consider in the ,Master-Detail Relationship-+
Record le!el access is determined by the parent#
Mandatory on child for reference of parent# cascade delete 8if you delete the parent# it can
cascade delete the child9.
*hat are the main thin.s need to consider in ,oo!up Relationship-+
oosely coupled# not going to ha!e all the abo!e rules which are e<isted in master detail
relationship.
Self relationship is always lookup to self relation object type. In many to many we
actually create a junction object in the middle, it does lookup for the bound objects that
are ultimately being bounded in a many to many way.
(an we con$ert the loo!up relationship to Master Detail relationship+
)es# "e can con!ert the lookup relationship to master detail relationship only if all the
e<isting record has !alid lookup field !alues.
(an we create Master Detail relationship on e/istin. records+
0o. first we ha!e to create the lookup relationship then populate the !alue on all e<isting
record and then con!ert it.
&ow to pro$ide Object 0ermissions+
ea!e a reply
Object Permissions
"hat is object permissions> +n salesforce we can pro!ide permissions to object at
profile?permissions sets le!el. $bject le!el we can pro!ide read1 create1 edit1 delete1
$iew all ) Modif" all permissions in profiles?permission sets.
-creening
*ow To
3ermissions
Tutorial
Transfer
Data Management
+n!entory Management
-alesforce
earn
Read: ,sers can only read?!iew records.
(reate: ,sers can read = create records.
2dit: ,sers can read = ;dit.
Delete: ,sers can read# ;dit = delete records.
3iew 4ll: ,sers can !iew all records in the object irrespecti!e of sharing settings.
Modif" 4ll: ,sers can read# edit# delete# !iew all = modify all 8can transfer# appro!e9
irrespecti!e of sharing settings.
Abo!e @ permissions we can set at object le!el in profile?permission set. Read# %reate#
;dit# Delete respects sharing settings. 'ut 4iew all = Modify all o!errides sharing
settings.
5a$i.ation to pro$ide object permissions
Setup -6 4dminister -6 Mana.e Users -6 profiles -6 select the profile you want gi!e
object permissions and go to object permissions and pro!ide re&uired object permissions
to profile. -ee the below screen for reference.
How to enable Console Keyboard Shortcuts in Salesforce?
.. 5o to -etup --A 'uild --A %reate --A Apps.
/. $pen the %onsole App.
What is the diference between Freeze and nacti!atin"
the user in Salesforce?
'ree7e:
+f an user is freeBed#
.. *e will not be able to login.
/. ,ser license of that user will not be released.
This is mainly used if you want to restrict an user to login during any acti!ity.
%heck the below link for CreeBing and ,nfreeBing.
httpD??www.infallibletechie.com?/E.1?.E?freeBe-button-in-salesforce-user-detail.html
#nacti$ate:
+f an user is inacti!ated#
.. *e will not be able to login.
/. Report will not run# if he?she is set as running user.
1. "eb to lead and web to case will not work# if he is set as the default creator.
4. ,ser license of the inacti!ates user will be free for other user.
This is mainly done# when the user lea!es the organiBation.
1. %lick F%ustomiBe keyboard shortcutsF link.
4. %lick F;ditF.
2. ;nable FGeyboard -hortcutsF and click F-a!eF button.
@. 5o to the %onsole application and click F-how Geyboard -hortcutsF.
How to set #eld de$endency in Salesforce?
.. -elect the object.
/. %lick FCield DependenciesF button.
1. %lick F0ewF button.
4. -elect the fields and click F%ontinueF button.
2. -elect the correct !alues under controlling fields# click F+nclude 4aluesF button and
click F-a!eF button.
@. %reate a new record to test it.
Security Settin"s in Salesforce
Record le$el securit"
.9 $"D - $rganiBation "ide Default
a9 3ri!ate
b9 3ublic read only
c9 3ublic Read?"rite
d9 3ublic Read?"rite?Transfer8$nly for %ase and ead9
e9 3ublic Cull Access8$nly for %ampaign9
/9 Role *ierarchy
19 -haring Rule
49 Manual -haring
Object le$el securit"
.9 3rofile
a9 %R;D or %R,D
b9 4iew All
c9 Modify All
d9 4iew All Data
d9 Modify All Data
/9 3ermission -et
18 *or!flow rules can perform which of the followin. actions usin. standard
Salesforce8com functionalit"+
48 Update a 'ield
98 Send an Outbound Messa.e
(8 Send an 2mail
D8 (reate a :as!
;8 :he Or.ani7ation #D (Or. #D) of a sandbo/ en$ironment is the same as its
production en$ironment8
A. True
98 'alse
<8 =im is a Salesforce8com s"stem administrator for Uni$ersal 0roducts #nc (U0#)8
U0# currentl" uses or.-wide public read>write for accounts8 :he sales department is
concerned with sales reps bein. able to see each other?s account data1 and would li!e
sales reps to onl" be able to $iew their own accounts8 Sales mana.ers should be able
to $iew and edit all accounts owned b" sales reps8 :he mar!etin. department at U0#
must be able to $iew all sales representati$e?s accounts at U0#8 *hat steps must be
confi.ured in order to meet these re@uirements+
48 (han.e Or.-*ide Securit" for 4ccounts to 0ri$ate
98 4dd Sharin. Rule to 0ro$ide Read 4ccess to Mar!etin. for Sales
Representati$e?s 4ccounts
(8 (onfi.ure Roles:
2/ecuti$e
-Mar!etin. (Subordinate of 2/ecuti$e)
-Sales Mana.ement (Subordinate of 2/ecuti$e)
--Sales Representati$es (Subordinate of Sales Mana.ement)
D. %reate -haring Rule to allow -ales Management to !iew?edit -ales Representati!esH
accounts
A8 :he Data oader can be used with Broup 2dition8
A. True
98 'alse
C8 *hat t"pe of object relationship best describes the relationship between
(ampai.ns and eads (usin. standard Salesforce functionalit")+
48 Man" to Man"
'. Many to $ne
%. $ne to $ne
D8 *hich of the followin. are $alid Salesforce license t"pes+
48 Ser$ice (loud
98 0latform ('orce8com)
(8 (ustomer 0ortal
D. 5old ;dition
28 Unlimited 2dition
C. 3latinum 3ortal
E8 *hich of the followin. are either current or future planned offerin.s b"
Salesforce8com or its subsidiaries+
48 :ouch
98 'low > 3isual 0rocess Mana.er
(8 &ero!u
D8 Sites > Siteforce
;. -tartCorce
F8 9ob is a Salesforce8com consultant and is responsible for the data mi.ration of an
implmentation for his client1 Uni$ersal S"stems #nc (US#)8
US# wants to mi.rate contacts and accounts from their le.ac" (RM s"stem1 which
has a similar data model (man" contacts per one accountG primar" !e"s e/ist on
contact and account)8
US# has pro$ided 9ob an e/port in (S3 format of contacts and accounts of their
le.ac" (RM s"stem8 *hat method should 9ob use to mi.rate the data from the
le.ac" s"stem into Salesforce+
A. An ;T or similar data migration tool must be used
98 (reate an e/ternal #D for account and use the data loader to upsert the data
with relationships intact
%. +nsert accounts into -alesforce and use ;<cel !lookup to match the legacy +D to the
-alesforce +D in order to insert associated contacts
H8 Uni$ersal 0roducts #nc (U0#) wants to perform a drip mar!etin. campai.n on
leads .enerated throu.h website submissions8 *hat is the ideal method to e/ecute
this t"pe of campai.n+
A. ,se -alesforce campaign management and series of workflow rules
98 #nte.rate Salesforce with a <rd part" $endor to perform mar!etin. automation
%. ;<port the data from -alesforce and manually send !ia 1rd party tool
1I8 *hich of the followin. are $alid wa"s to mi.rate metadata+
A. Data oader
98 (han.e Sets
(8 'orce8com #D2
D8 45: Mi.ration :ool!it
Similar O$$ortunities in Salesforce
.. 5o to %ustomiBe --A $pportunities --A -imilar $pportunities.
/. ;nable -imilar $pportunities and -a!e.
1. Add the -imilar $pportunities related list.
4. %lick FCindF button to find -imilar $pportunities.
2. -elect the $pportunities and click F'ookmarkF button.
@. 5o to the record to !iew it.
%ar&etin" user chec&bo' in Salesforce
- %reate a new campaign
- ;dit an e<isting campaign
- Delete an e<isting campaign
- ,pdate campaign statistics
- +mport leads into a campaignI
- Mass update the status for members of a campaignI
- %onfigure ad!anced campaign setup to define member status !alues
- Run campaign reports across multiple campaigns
I +n order to use the campaign import wiBards# Marketing ,sers must also ha!e the
Marketing ,ser profile 8or the F+mport eadsF permission in ;nterprise ;dition
organiBations9.
Force(com Wor& O)ine
.. 5o to My -ettings.
/. -elect Corce.com %onnect $ffline under Desktop Add-$ns.
1. %lick F%lick *ereF to sa!e the file or you run if you get run option.
4. -elect the language.
2. -elect the Destination Colder.
@. %lick shortcut icon
J. ;nter your login credentials.
%ass *ransfer records in Salesforce
.. 5o to -etup --A Administer --A Data Management --A Mass Transfer Records.
/. -elect the object.
1. ;nter the criteria and click FCindF button to find the records.
4. %lick FTransferF button to transfer the records.
Stora"e usa"e in Salesforce
-torage usage is used to find the organiBationHs storage usage.
+uto res$onse rule in Salesforce
An auto-response rule is a set of conditions for sending automatic email responses to lead
or case submissions based on the attributes of the submitted record. Applicable leads
include those captured through a "eb-to-ead form. Applicable cases include those
submitted through aD
-elf--er!ice portal
%ustomer 3ortal
"eb-to-%ase form
;mail-to-%ase message
$n-Demand ;mail-to-%ase message
)ou can create as many response rules as you like based on any attribute of the incoming
lead or case# but only one rule for leads and one for cases can be acti!e at a time.
.. %reate re&uired email templates.
/. 5o -etup --A 'uild --A %ustomiBe --A eads --A Auto-Response Rules.
1. %lick F0ewF button.
4. 5i!e a name# check F-et this as the acti!e "eb-to-ead Auto-Response ruleF check
bo< and click F-a!eF button.
2. $pen the Auto - Response Rule.
@. %lick F0ewF to create rule entries.
J. 'elow is the list of rule entries.
K. %reate a sample ead from "eb to ead form.
Output:
+ssi"nment rule in Salesforce
Create assignment rules to automate your organizations lead
generation and support processes.
,ead +ssi"nment -ulesSpecify how leads are assigned to
users or queues as they are created manually, captured from the web,
or imported via the lead import wizards.
Case +ssi"nment -ulesDetermine how cases are assigned to
users or put into queues as they are created manually, using eb!to!
Case, "mail!to!Case, #n!Demand "mail!to!Case, the Self!
Service portal, the Customer $ortal, #utloo%, or &otus 'otes.
Ste$s for creatin" ,ead +ssi"nment -ule.
(. )o to Setup !!* +uild !!* Customize !!* &eads !!* ,ssignment -ule.
.. Clic% /'ew/ button.
0. )ive a name, chec% /Set this as the active lead assignment rule/
chec% bo1.
2. #pen the assignment rule.
3. Clic% /'ew/ to create a rule entry.
4. "nter the criteria as per your requirement.
5. +elow is the output of my rule criteria.
6. )o to &eads tab. Create a &ead record. Chec% /,ssign using active
assignment rule/ chec% bo1.
Out$ut.
7his lead record is assigned to 8agulan D because the &ead city is
Chennai.
Feed *rac&in" in Salesforce
,sing Ceed Tracking# users can see updates for records they follow in their %hatter
feed."e can track only up to /E fields per object.
The following standard field types canHt be trackedD
Auto-number# formula# and roll-up summary fields
;ncrypted and read-only system fields
The ;<pected Re!enue field on opportunities
The -olution Title and -olution Details fields on solutions
+t wonHt show modified !alues and old !alues for Multi-3icklist and ong Te<tarea
fields.
.. *istory tracking shows the followingD
/. 3rior !alue - old !alue.
1. %urrent !alue - !alue.
4. "ho has done the changes - person who modified it.
2. "hen it was changed - date and time of modification.
.. 5o to -etup --A 'uild --A %ustomiBe --A %hatter --A Ceed Tracking.
2. Enable Feed Tracking, select the fields and click "Save" button.
Output:
How to enable O$$ortunity s$lit in Salesforce?
.. 5o to -etup --A 'uild --A %ustomiBe --A $pportunity --A $pportunity Team.
/. ;nable Team -elling.
1. -elect the 3age ayouts.
4. 5o to -etup --A 'uild --A %ustomiBe --A $pportunity --A $pportunity Team --A
$pportunity -plits.
2. ;nable $pportunity -plits.
@. -elect the 3age ayouts.
J. $pen an opportunity with team members associated with it.
K. %lick F;dit $pportunity -plitsF button.
L. ;nter the details and click F-a!eF button.
Output:
Console *ab in Salesforce
The console is a tab that combines related records into one screen with different frames
so that users ha!e all the information they need when interacting with -alesforce.
%ommon tasks are accomplished with fewer clicks and without much na!igation.
Administrators choose the information displayed in the console to accommodate !aried
and e!ol!ing business processes.
Settin. up and usin. the (onsole tab:
.. %lick )our 0ame --A -etup --A %ustomiBe --A Agents %onsole --A %onsole ayouts.
/. %lick F0ew 'uttonF to create a %onsole ayout.
1. ;nter the layout name and click F-a!eF button.
4. $pen the %onsole ayout and click F;ditF button in -elected ist 4iews.
2. Add or remo!e objects that you want users to choose from in the list !iew of the
console and click F-a!eF button.
@. 5o to %reate --A Apps.
J. %lick F;ditF link to the app in which you want %onsole tab.
K. Add %onsole tab to the -elected Tabs and click F-a!eF button.
L. 5o to %onsole ayout and click F%onsole ayout AssignmentF button.
.E. Assign it to the 3rofiles and click F-a!eF button.
... %lick F%onsoleF tab to !iew it.