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

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.
主站蜘蛛池模板: 渝中区| 泾源县| 谢通门县| 当阳市| 贺州市| 福建省| 东乡族自治县| 乳源| 陇西县| 阿城市| 江阴市| 甘泉县| 将乐县| 托里县| 平和县| 克拉玛依市| 高州市| 东城区| 沂水县| 甘洛县| 调兵山市| 宜兴市| 綦江县| 丁青县| 铁力市| 德州市| 随州市| 永寿县| 轮台县| 平陆县| 平阴县| 许昌市| 平湖市| 高州市| 长葛市| 望江县| 玛曲县| 雅江县| 建水县| 堆龙德庆县| 东丽区|