Thursday, 26 July 2018

How to create master-detail relationship in salesforce?

Master detail relationship is like parent
-child relationship where, master represents
a parent and detail represents a child in
which master object controls some
behaviours of the detail object.
Like whenever a master object record is
deleted then the detail object related
to it also gets deleted.

Master-detail relationship can be defined
between custom objects or between a
standard object and a custom object.
The detail object automatically gets the
security and sharing settings given to
the master object.

A child of one master detail relationship
can't become a parent of another object.
To relate an object to another object,no
records should exist in the child object.

Rollup summary fields can only be created
on Master records,which are used to
calculate the count,sum,min,max ect of
child records.

Note :
we can't create a master - detail relationship
on existing records.To do that,we have to
create a lookup relationship for that
record and then convert it into master detail.

The master detail relationship does not
allow for 'orphaned' child records.

To convert a lookup relationship to a
master detail the existing record should
consist of valid lookup field values.

You can build many to many relationships
using two master details relationships in
an object, and it is called as junction object.

Standard objects can't be on a detail side
of a master detail relationship.Access to
detail is determined by the access given
for master.

supports cross-object work can
configure a field update action to
update a field in the parent record
using a value from the child record.

Limitations :
1.Only upto two master detail relationships
are allowed for an object. can have only Upto three levels of
custom detail levels.
3.We can't create a master-detail relationship
when the custom object already contains data.

4.Each object is allowed to have one or two
master or upto 8 details.

5.After converting a lookup field into master-
detail relationship,test your custom reports,
whther they are usable or not.
Sometimes upon converting the custom reports
can become unusable due to different standard
report types.

No comments:

Post a Comment