官术网_书友最值得收藏!

Object relationships

You can relate an object to other objects in Salesforce. For example, relating a custom object Expense to custom object Project. With this relation, you'll know which expense record is used for which project. Project, in this example, will be considered as the parent object, and Expense as a child object. From the record-level perspective, one parent can have many children, while the child can only have one parent. To build this relationship from the child object, create a Lookup Relationship or Master-Detail Relationship field to the parent object.

There are three types of object relationships in Salesforce, which are as follows:

  • Master-Detail Relationship
  • Lookup Relationship
  • Hierarchical Relationship

The following table compares the Master-Detail Relationship and Lookup Relationship:

To create a Master-Detail Relationship for an existing object that contains records as a child object, you can initially set it as a Lookup Relationship, populate the parent field for all child records, and then change the relationship to Master-Detail Relationship.

Hierarchical Relationship is a special Lookup relationship available for the user object only. It lets users use a lookup field to associate one user with another, which does not directly or indirectly refer to itself. For example, you can create a custom Hierarchical Relationship field to store each user's reporting manager.

You can build a many-to-many object relationship using two Master-Detail Relationships in a single custom object; this is known as a Junction object.
主站蜘蛛池模板: 锡林郭勒盟| 延安市| 荆门市| 武平县| 垣曲县| 长阳| 黑山县| 威信县| 花莲市| 嘉定区| 饶平县| 雷波县| 沾益县| 巴塘县| 镇远县| 黎平县| 香格里拉县| 迁安市| 调兵山市| 延寿县| 广德县| 宝丰县| 新晃| 蕉岭县| 敦化市| 论坛| 昔阳县| 湄潭县| 塔城市| 扎囊县| 普格县| 乾安县| 长沙县| 甘泉县| 宁晋县| 正镶白旗| 伊金霍洛旗| 石嘴山市| 巫山县| 长岭县| 繁昌县|