Object Relationship

  1. One-to-many(lookup/ master-detail)
  2. Many-to-many------创建junction object 然后用2个master-detail建立联系

Master-detail

Lookup

Customer-customer/ standard-customer

Standard obj必须是master

任意两个object

一删全删

可以配置---清空child表中的parent字段/防止删除parent记录

Master 必须有

Parent 可以为空

Detail表没有owner,由master 表确定owner,因此detail不能有queue, queue需要owner

Parent 和child 不相关

Security 由master表确定

不继承parent 表的security设定

可以使用rollup summary

不能使用rollup summary

可以使用cross-object workflow

不能使用cross-object workflow

一个object最多有2个master

一个object最多有25个lookup(formula 字段只可以用10层)

Detail表不能是其他表的master

Master不能再做其他表的detail,

例如:1(M)---2(D) -----3

1表上不能再建MD

3表上可以建MD连到2

 

 

可以多层嵌套

如果没有roll-up summary可以re-parent

可以创建Self Relationship

可以转为look-up

有限制

可以实现related list(parent上显示child)

可以实现related list(parent上显示child)

Master-detail:

Child最好不要超出1万

Child最多往下3层,即算第一个master,一共4个,参考MCCP

Detail and subdetail records inherit security settings and permissions from the master record. You can’t set permissions on the detail record independently.

The master-detail relationship field (which is the field linking the objects) is required on the page layout of the detail and subdetail records.

 

实现one-to-one:

  1. Lookup方法
    1. Object B lookup A,
    2.  B 上建立一个unique field存放A的id
    3. 使用workflow更新B上的unique field
  2. Master-detail
    1. A-B master-detail relationship, B is detail side.
    2.  A上创建roll-up summary field统计B的数量
    3. 使用validation rule 检测roll-up summary 是否大于1

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值